public UpdateRemoteTAs ( IList |
||
list | IList |
|
e | Edge | |
ta | TransportAddress | |
return | void |
public virtual void UpdateRemoteTAs(IList<TransportAddress> list, Edge e, TransportAddress ta) {
if( e.TAType == this.TAType ) {
if( e.RemoteTANotEphemeral ) {
//There is some chance this will be good again in the future
//But, we only keep non-natted TAs, since NAT mappings change
//so frequently, a NATed TA will probably be bad in the future
if( ta.Equals( e.RemoteTA ) ) {
//This node is not behind a NAT.
int idx = list.IndexOf(ta);
if( idx >= 0 ) {
list.Remove(ta);
}
//Now put the i
list.Insert(0, ta);
}
}
}
}
///<summary>This is passed tothe underlying EdgeListener. By default we do ///nothing to this.</summary> public override void UpdateRemoteTAs(IList <TransportAddress> list, Edge e, TransportAddress ta) { WrapperEdge edge = e as WrapperEdge; if (edge != null) { _el.UpdateRemoteTAs(list, edge.WrappedEdge, ta); } }