C# Класс Brunet.Tunnel.TunnelEdge

Holds the state information for a Tunnels.
Наследование: System.Edge
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Header MemBlock
LocalID int

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

Свойство Тип Описание
_ias IForwarderSelector
_local_ta TransportAddress
_mid MemBlock
_rand System.Random
_remote_id int
_remote_ta TransportAddress
_tunnels List

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

Метод Описание
DisconnectionHandler ( Connection con ) : void

We don't want to send on disconnected edges. So we remove said connections and edges!

ShouldClose ( ) : bool

We need to make sure we still have a way out of the tunnel maze, otherwise we could get an endless loop resulting in a stack exception. For now, we will simply ensure that one of our overlap or our overlaps overlap has at least one such connection. Furthermore, if we have a long chain of tunnels relying on one overlap, they will eventually all close after the top most peer which happens to be in their overlap closes.

TunnelEdge ( IEdgeSendHandler send_handler, Brunet.Tunnel.TunnelTransportAddress local_ta, Brunet.Tunnel.TunnelTransportAddress remote_ta, IForwarderSelector ias, List overlap ) : System

Outgoing edge, since we don't know the RemoteID yet!

TunnelEdge ( IEdgeSendHandler send_handler, Brunet.Tunnel.TunnelTransportAddress local_ta, Brunet.Tunnel.TunnelTransportAddress remote_ta, IForwarderSelector ias, List overlap, int remote_id ) : System

Constructor for a TunnelEdge, RemoteID == -1 for out bound.

UpdateNeighborIntersection ( List neighbors ) : void

When our tunnel peer has some state change, he notifies us and use that information to update our overlap, here we set the overlap.

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

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

We don't want to send on disconnected edges. So we remove said connections and edges!
public DisconnectionHandler ( Connection con ) : void
con Connection
Результат void

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

We need to make sure we still have a way out of the tunnel maze, otherwise we could get an endless loop resulting in a stack exception. For now, we will simply ensure that one of our overlap or our overlaps overlap has at least one such connection. Furthermore, if we have a long chain of tunnels relying on one overlap, they will eventually all close after the top most peer which happens to be in their overlap closes.
public ShouldClose ( ) : bool
Результат bool

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

Outgoing edge, since we don't know the RemoteID yet!
public TunnelEdge ( IEdgeSendHandler send_handler, Brunet.Tunnel.TunnelTransportAddress local_ta, Brunet.Tunnel.TunnelTransportAddress remote_ta, IForwarderSelector ias, List overlap ) : System
send_handler IEdgeSendHandler
local_ta Brunet.Tunnel.TunnelTransportAddress
remote_ta Brunet.Tunnel.TunnelTransportAddress
ias IForwarderSelector
overlap List
Результат System

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

Constructor for a TunnelEdge, RemoteID == -1 for out bound.
public TunnelEdge ( IEdgeSendHandler send_handler, Brunet.Tunnel.TunnelTransportAddress local_ta, Brunet.Tunnel.TunnelTransportAddress remote_ta, IForwarderSelector ias, List overlap, int remote_id ) : System
send_handler IEdgeSendHandler
local_ta Brunet.Tunnel.TunnelTransportAddress
remote_ta Brunet.Tunnel.TunnelTransportAddress
ias IForwarderSelector
overlap List
remote_id int
Результат System

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

When our tunnel peer has some state change, he notifies us and use that information to update our overlap, here we set the overlap.
public UpdateNeighborIntersection ( List neighbors ) : void
neighbors List
Результат void

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

Header публичное свойство

public MemBlock Header
Результат MemBlock

LocalID публичное свойство

public int LocalID
Результат int

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

protected IForwarderSelector _ias
Результат IForwarderSelector

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

protected TransportAddress _local_ta
Результат TransportAddress

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

protected MemBlock _mid
Результат MemBlock

_rand защищенное статическое свойство

protected static Random,System _rand
Результат System.Random

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

protected int _remote_id
Результат int

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

protected TransportAddress _remote_ta
Результат TransportAddress

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

A functional list of tunnels. Replace to update.
protected List _tunnels
Результат List