C# Класс 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.
Наследование: INat
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_allow_inbound bool
_allowed bool>.TimeBasedCache
_external_ta Brunet.Transport.TransportAddress[]
_internal_ta Brunet.Transport.TransportAddress[]
_known_tas Brunet.Transport.TransportAddress[]

Открытые методы

Метод Описание
ConeNat ( TransportAddress ta, int timeout ) : System.Collections
Incoming ( TransportAddress ta ) : bool
Outgoing ( TransportAddress ta ) : bool
UpdateTAs ( TransportAddress remote_ta, TransportAddress local_ta ) : void

Приватные методы

Метод Описание
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.

Описание методов

ConeNat() публичный Метод

public ConeNat ( TransportAddress ta, int timeout ) : System.Collections
ta Brunet.Transport.TransportAddress
timeout int
Результат System.Collections

Incoming() публичный Метод

public Incoming ( TransportAddress ta ) : bool
ta Brunet.Transport.TransportAddress
Результат bool

Outgoing() публичный Метод

public Outgoing ( TransportAddress ta ) : bool
ta Brunet.Transport.TransportAddress
Результат bool

UpdateTAs() публичный Метод

public UpdateTAs ( TransportAddress remote_ta, TransportAddress local_ta ) : void
remote_ta Brunet.Transport.TransportAddress
local_ta Brunet.Transport.TransportAddress
Результат void

Описание свойств

_allow_inbound защищенное свойство

protected bool _allow_inbound
Результат bool

_allowed защищенное свойство

protected TimeBasedCache _allowed
Результат bool>.TimeBasedCache

_external_ta защищенное свойство

protected TransportAddress[],Brunet.Transport _external_ta
Результат Brunet.Transport.TransportAddress[]

_internal_ta защищенное свойство

protected TransportAddress[],Brunet.Transport _internal_ta
Результат Brunet.Transport.TransportAddress[]

_known_tas защищенное свойство

protected TransportAddress[],Brunet.Transport _known_tas
Результат Brunet.Transport.TransportAddress[]