C# 클래스 SipSharp.Transports.TcpTransport

Transports messages over TCP.
This transport takes care of ALL sockets for TCP.
상속: ITransport
파일 보기 프로젝트 열기: jgauffin/SipSharp 1 사용 예제들

공개 메소드들

메소드 설명
Send ( EndPoint endPoint, byte buffer, int offset, int count ) : void

Send a buffer to a certain end point.

Start ( ) : void

Starts the specified end point.

TcpTransport ( IPEndPoint endPoint, MessageFactory factory ) : System

Initializes a new instance of the TcpTransport class.

보호된 메소드들

메소드 설명
CreateAndConnect ( IPEndPoint endPoint ) : ClientContext

Create a new socket and try to connect to a remote client/server.

SetupNewContext ( Socket socket ) : void

Create a new context and allocate it's buffer.

비공개 메소드들

메소드 설명
HandleDisconnect ( ClientContext context ) : void
OnAccept ( IAsyncResult ar ) : void
OnReceive ( IAsyncResult ar ) : void
OnSend ( IAsyncResult ar ) : void

메소드 상세

CreateAndConnect() 보호된 메소드

Create a new socket and try to connect to a remote client/server.
If connection fails.
protected CreateAndConnect ( IPEndPoint endPoint ) : ClientContext
endPoint System.Net.IPEndPoint Endpoint that should get connected.
리턴 ClientContext

Send() 공개 메소드

Send a buffer to a certain end point.
is not of the type expected by the transport implementation endPoint is null. offset+count is out of range.
public Send ( EndPoint endPoint, byte buffer, int offset, int count ) : void
endPoint System.Net.EndPoint End point that the buffer should be sent to.
buffer byte buffer to send.
offset int Position of first byte to send.
count int Number of bytes, from offset, to send.
리턴 void

SetupNewContext() 보호된 메소드

Create a new context and allocate it's buffer.
Could not allocate new buffer. Could not read from socket. Socket have been disposed.
protected SetupNewContext ( Socket socket ) : void
socket Socket The socket.
리턴 void

Start() 공개 메소드

Starts the specified end point.
is not of the type expected by the transport implementation endPoint is null. If listener cannot be started.
public Start ( ) : void
리턴 void

TcpTransport() 공개 메소드

Initializes a new instance of the TcpTransport class.
public TcpTransport ( IPEndPoint endPoint, MessageFactory factory ) : System
endPoint System.Net.IPEndPoint End point to accept new connections on.
factory SipSharp.Messages.MessageFactory Message factory.
리턴 System