C# 클래스 NSocket.SocketLib.SocketListener

파일 보기 프로젝트 열기: ODotNet/NSocket 1 사용 예제들

공개 메소드들

메소드 설명
Init ( ) : void

服务端初始化

Send ( string uid, string msg ) : void
SocketListener ( int receiveBufferSize, int numConcurrence ) : System

初始化服务器端

Start ( int port ) : void

启动服务器

Stop ( ) : void

停止服务器

비공개 메소드들

메소드 설명
CloseClientConnection ( string uid ) : void
OnAcceptCompleted ( object sender, SocketAsyncEventArgs e ) : void

客户端连接请求处理事件

OnReceiveCompleted ( object sender, SocketAsyncEventArgs e ) : void
OnSendCompleted ( object sender, SocketAsyncEventArgs e ) : void
ProcessAccept ( SocketAsyncEventArgs e ) : void

客户端连接请求处理方法

ProcessReceive ( NSocketSocketAsyncEventArgs e ) : void
ReceiveListen ( NSocketSocketAsyncEventArgs e ) : void
StartAccept ( SocketAsyncEventArgs acceptEventArg ) : void

接受客户端的连接请求

WasteClientMonitorHandler ( object state ) : void

메소드 상세

Init() 공개 메소드

服务端初始化
public Init ( ) : void
리턴 void

Send() 공개 메소드

public Send ( string uid, string msg ) : void
uid string
msg string
리턴 void

SocketListener() 공개 메소드

初始化服务器端
public SocketListener ( int receiveBufferSize, int numConcurrence ) : System
receiveBufferSize int
numConcurrence int
리턴 System

Start() 공개 메소드

启动服务器
public Start ( int port ) : void
port int
리턴 void

Stop() 공개 메소드

停止服务器
public Stop ( ) : void
리턴 void