C# Class Brunet.Relay.SimpleRelayOverlap

Inheritance: IRelayOverlap
Mostrar archivo Open project: pstjuste/brunet Class Usage Examples

Public Methods

Method Description
EvaluateOverlap ( ConnectionList cons, IDictionary msg ) : List

Returns the oldest 4 addresses in the overlap.

EvaluatePotentialOverlap ( IDictionary msg ) : Address

Always returns the oldest non-tunnel address.

FindOverlap ( RelayTransportAddress ta, ConnectionList cons ) : List

Attempt to find the overlap in a remote RelayTransportAddress and our local node. This will be used to help communicate with a new tunneled peer.

GetSyncMessage ( IList current_overlap, Address local_addr, ConnectionList cons ) : IDictionary

Returns a Relay Sync message containing up to 40 addresses first starting with previous overlap followed by new potential connections for overlap.

Protected Methods

Method Description
GetOldest ( ConnectionList cons ) : List

Returns the 4 oldest connections.

GetOldest ( List cons ) : List

Method Details

EvaluateOverlap() public method

Returns the oldest 4 addresses in the overlap.
public EvaluateOverlap ( ConnectionList cons, IDictionary msg ) : List
cons ConnectionList
msg IDictionary
return List

EvaluatePotentialOverlap() public method

Always returns the oldest non-tunnel address.
public EvaluatePotentialOverlap ( IDictionary msg ) : Address
msg IDictionary
return Address

FindOverlap() public method

Attempt to find the overlap in a remote RelayTransportAddress and our local node. This will be used to help communicate with a new tunneled peer.
public FindOverlap ( RelayTransportAddress ta, ConnectionList cons ) : List
ta RelayTransportAddress
cons ConnectionList
return List

GetOldest() protected method

Returns the 4 oldest connections.
protected GetOldest ( ConnectionList cons ) : List
cons ConnectionList
return List

GetOldest() protected method

protected GetOldest ( List cons ) : List
cons List
return List

GetSyncMessage() public method

Returns a Relay Sync message containing up to 40 addresses first starting with previous overlap followed by new potential connections for overlap.
public GetSyncMessage ( IList current_overlap, Address local_addr, ConnectionList cons ) : IDictionary
current_overlap IList
local_addr Address
cons ConnectionList
return IDictionary