C# Class Brunet.Simulator.Transport.ConeNat

Supports a very simple Cone NAT. Once the node has learned its own address and it has a stable connection to another peer, it allows inbound connections. Incoming messages are allow so long as there is an existing NAT mapping.
Inheritance: INat
Afficher le fichier Open project: pstjuste/brunet Class Usage Examples

Protected Properties

Свойство Type Description
_allow_inbound bool
_allowed bool>.TimeBasedCache
_external_ta Brunet.Transport.TransportAddress[]
_internal_ta Brunet.Transport.TransportAddress[]
_known_tas Brunet.Transport.TransportAddress[]

Méthodes publiques

Méthode Description
ConeNat ( TransportAddress ta, int timeout ) : System.Collections
Incoming ( TransportAddress ta ) : bool
Outgoing ( TransportAddress ta ) : bool
UpdateTAs ( TransportAddress remote_ta, TransportAddress local_ta ) : void

Private Methods

Méthode Description
HandleEviction ( object sender, bool>.TimeBasedCache ea ) : void

If there are no more entries in the cache, our mapping has, we will no longer allow inbound connections.

Method Details

ConeNat() public méthode

public ConeNat ( TransportAddress ta, int timeout ) : System.Collections
ta Brunet.Transport.TransportAddress
timeout int
Résultat System.Collections

Incoming() public méthode

public Incoming ( TransportAddress ta ) : bool
ta Brunet.Transport.TransportAddress
Résultat bool

Outgoing() public méthode

public Outgoing ( TransportAddress ta ) : bool
ta Brunet.Transport.TransportAddress
Résultat bool

UpdateTAs() public méthode

public UpdateTAs ( TransportAddress remote_ta, TransportAddress local_ta ) : void
remote_ta Brunet.Transport.TransportAddress
local_ta Brunet.Transport.TransportAddress
Résultat void

Property Details

_allow_inbound protected_oe property

protected bool _allow_inbound
Résultat bool

_allowed protected_oe property

protected TimeBasedCache _allowed
Résultat bool>.TimeBasedCache

_external_ta protected_oe property

protected TransportAddress[],Brunet.Transport _external_ta
Résultat Brunet.Transport.TransportAddress[]

_internal_ta protected_oe property

protected TransportAddress[],Brunet.Transport _internal_ta
Résultat Brunet.Transport.TransportAddress[]

_known_tas protected_oe property

protected TransportAddress[],Brunet.Transport _known_tas
Résultat Brunet.Transport.TransportAddress[]