C# 클래스 NetworkCommsDotNet.Connections.Connection

파일 보기 프로젝트 열기: MarcFletcher/NetworkComms.Net 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
asyncListenStarted bool
asyncListenerInRead bool
connectionEstablishWait System.Threading.ManualResetEvent
connectionSetupException bool
connectionSetupExceptionStr string
connectionSetupWait System.Threading.ManualResetEvent
incomingDataListenThread Thread
packetBuilder NetworkCommsDotNet.Tools.PacketBuilder
totalBytesRead int

공개 메소드들

메소드 설명
EstablishConnection ( ) : void

Establish this connection

ToString ( ) : string

Returns ConnectionInfo.ToString

보호된 메소드들

메소드 설명
Connection ( ConnectionInfo connectionInfo, SendReceiveOptions defaultSendReceiveOptions ) : System

Create a new connection object

ConnectionHandshake ( ) : void

Performs a connection handshake with the remote end of the connection. Exchanges network identifier and any listener whose IPAddress matches the connection localEndPoint IPAddress.

EstablishConnectionSpecific ( ) : void

Any connection type specific establish tasks. Should call at least ConnectionHandshake() or TriggerConnectionEstablishDelegates();

IncomingPacketHandleHandOff ( PacketBuilder packetBuilder ) : void

Attempts to use the data provided in packetBuilder to recreate something useful. If we don't have enough data yet that value is set in packetBuilder.

StartIncomingDataListen ( ) : void

A connection specific method which triggers any requisites for accepting incoming data

TriggerConnectionEstablishDelegates ( ) : void

Trigger connection establish delegates.

WaitForConnectionEstablish ( int waitTimeoutMS ) : bool

Return true if the connection is established within the provided timeout, otherwise false

비공개 메소드들

메소드 설명
CheckSumFailResendHandler ( MemoryStream packetDataSection ) : void

Handle an incoming CheckSumFailResend packet type

ConnectionSetupHandler ( MemoryStream packetDataSection ) : void

Handle an incoming ConnectionSetup packet type

ConnectionSetupHandlerFinal ( ConnectionInfo remoteConnectionInfo, bool &possibleClashWithExistingConnection, Connection &existingConnection ) : bool

Attempts to complete the connection establish with a minimum of locking to avoid possible deadlocking

메소드 상세

Connection() 보호된 메소드

Create a new connection object
protected Connection ( ConnectionInfo connectionInfo, SendReceiveOptions defaultSendReceiveOptions ) : System
connectionInfo ConnectionInfo ConnectionInfo corresponding to the new connection
defaultSendReceiveOptions SendReceiveOptions The SendReceiveOptions which should be used as connection defaults
리턴 System

ConnectionHandshake() 보호된 메소드

Performs a connection handshake with the remote end of the connection. Exchanges network identifier and any listener whose IPAddress matches the connection localEndPoint IPAddress.
protected ConnectionHandshake ( ) : void
리턴 void

EstablishConnection() 공개 메소드

Establish this connection
public EstablishConnection ( ) : void
리턴 void

EstablishConnectionSpecific() 보호된 추상적인 메소드

Any connection type specific establish tasks. Should call at least ConnectionHandshake() or TriggerConnectionEstablishDelegates();
protected abstract EstablishConnectionSpecific ( ) : void
리턴 void

IncomingPacketHandleHandOff() 보호된 메소드

Attempts to use the data provided in packetBuilder to recreate something useful. If we don't have enough data yet that value is set in packetBuilder.
protected IncomingPacketHandleHandOff ( PacketBuilder packetBuilder ) : void
packetBuilder NetworkCommsDotNet.Tools.PacketBuilder The containing incoming cached data
리턴 void

StartIncomingDataListen() 보호된 추상적인 메소드

A connection specific method which triggers any requisites for accepting incoming data
protected abstract StartIncomingDataListen ( ) : void
리턴 void

ToString() 공개 메소드

Returns ConnectionInfo.ToString
public ToString ( ) : string
리턴 string

TriggerConnectionEstablishDelegates() 보호된 메소드

Trigger connection establish delegates.
protected TriggerConnectionEstablishDelegates ( ) : void
리턴 void

WaitForConnectionEstablish() 보호된 메소드

Return true if the connection is established within the provided timeout, otherwise false
protected WaitForConnectionEstablish ( int waitTimeoutMS ) : bool
waitTimeoutMS int Wait time in milliseconds before returning
리턴 bool

프로퍼티 상세

asyncListenStarted 보호되어 있는 프로퍼티

True if async listen has started
protected bool asyncListenStarted
리턴 bool

asyncListenerInRead 보호되어 있는 프로퍼티

True if the async listen method is in a beginRead
protected bool asyncListenerInRead
리턴 bool

connectionEstablishWait 보호되어 있는 프로퍼티

A manual reset event which can be used to handle connection setup and establish.
protected ManualResetEvent,System.Threading connectionEstablishWait
리턴 System.Threading.ManualResetEvent

connectionSetupException 보호되어 있는 프로퍼티

A boolean used to signal a connection setup exception.
protected bool connectionSetupException
리턴 bool

connectionSetupExceptionStr 보호되어 있는 프로퍼티

If connectionSetupException is true provides additional exception information.
protected string connectionSetupExceptionStr
리턴 string

connectionSetupWait 보호되어 있는 프로퍼티

A manual reset event which can be used to handle connection setup and establish.
protected ManualResetEvent,System.Threading connectionSetupWait
리턴 System.Threading.ManualResetEvent

incomingDataListenThread 보호되어 있는 프로퍼티

The thread listening for incoming data should we be using synchronous methods.
protected Thread incomingDataListenThread
리턴 Thread

packetBuilder 보호되어 있는 프로퍼티

The PacketBuilder for this connection
protected PacketBuilder,NetworkCommsDotNet.Tools packetBuilder
리턴 NetworkCommsDotNet.Tools.PacketBuilder

totalBytesRead 보호되어 있는 프로퍼티

The total bytes read so far within dataBuffer
protected int totalBytesRead
리턴 int