C# 클래스 Brunet.Tunnel.TunnelEdge

Holds the state information for a Tunnels.
상속: System.Edge
파일 보기 프로젝트 열기: johnynek/brunet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Header MemBlock
LocalID int

보호된 프로퍼티들

프로퍼티 타입 설명
_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