C# 클래스 Granados.IO.PlainSocket

상속: Granados.IO.AbstractGranadosSocket
파일 보기 프로젝트 열기: poderosaproject/poderosa 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Close connection

Dispose ( ) : void

Implements IDisposable.

PlainSocket ( Socket socket, IDataHandler handler ) : System

Constructor

ReadIfAvailable ( byte buf ) : int

Read bytes if any data can be read.

This method fails if asynchronous receiving is already started by RepeatAsyncRead().

RepeatAsyncRead ( ) : void

Start asynchronous receiving cycle.

SetHandler ( IDataHandler handler ) : void

Set callback handler.

Write ( byte data, int offset, int length ) : void

Write data to the socket

비공개 메소드들

메소드 설명
DoClose ( ) : void
FireOnClosed ( ) : void

Call OnClosed() callback

ReceivingThread ( ) : void

Receiving thread

메소드 상세

Close() 공개 메소드

Close connection
public Close ( ) : void
리턴 void

Dispose() 공개 메소드

Implements IDisposable.
public Dispose ( ) : void
리턴 void

PlainSocket() 공개 메소드

Constructor
public PlainSocket ( Socket socket, IDataHandler handler ) : System
socket System.Net.Sockets.Socket socket object (must be already connected)
handler IDataHandler callback handler (can be null if no handler is specified)
리턴 System

ReadIfAvailable() 공개 메소드

Read bytes if any data can be read.
This method fails if asynchronous receiving is already started by RepeatAsyncRead().
public ReadIfAvailable ( byte buf ) : int
buf byte byte array to store data in.
리턴 int

RepeatAsyncRead() 공개 메소드

Start asynchronous receiving cycle.
public RepeatAsyncRead ( ) : void
리턴 void

SetHandler() 공개 메소드

Set callback handler.
public SetHandler ( IDataHandler handler ) : void
handler IDataHandler handler
리턴 void

Write() 공개 메소드

Write data to the socket
public Write ( byte data, int offset, int length ) : void
data byte byte array that contains data to write
offset int start index of data
length int byte count to write
리턴 void