Method | Description | |
---|---|---|
AddListener ( string name, |
add socket listener
|
|
SocketServer ( IServerHandler handler, IEncoder encoder, IDecoder decoder ) : System |
使用默认配置参数的构造函数
|
|
SocketServer ( IServerHandler handler, Protocol protocol, int socketBufferSize, int messageBufferSize, int maxMessageSize, int maxConnections ) : System |
new
|
|
Start ( ) : void |
start
|
|
Stop ( ) : void |
stop
|
Method | Description | |
---|---|---|
OnConnected ( IConnection connection ) : void |
OnConnected
|
|
OnDisconnected ( IConnection connection, |
OnDisconnected
|
|
OnError ( IConnection connection, |
onError
|
|
OnMessageReceived ( IConnection connection, |
OnMessageReceived
|
|
OnSendCallback ( IConnection connection, SendCallbackEventArgs e ) : void |
send callback
|
|
OnStartSending ( IConnection connection, Packet packet ) : void |
start sending
|
Method | Description | |
---|---|---|
listener_Accepted ( ISocketListener listener, IConnection connection ) : void |
socket accepted handler
|
public AddListener ( string name, |
||
name | string | |
endPoint | ||
return | ISocketListener |
protected OnConnected ( IConnection connection ) : void | ||
connection | IConnection | |
return | void |
protected OnDisconnected ( IConnection connection, |
||
connection | IConnection | |
ex | ||
return | void |
protected OnError ( IConnection connection, |
||
connection | IConnection | |
ex | ||
return | void |
protected OnMessageReceived ( IConnection connection, |
||
connection | IConnection | |
e | ||
return | void |
protected OnSendCallback ( IConnection connection, SendCallbackEventArgs e ) : void | ||
connection | IConnection | |
e | SendCallbackEventArgs | |
return | void |
protected OnStartSending ( IConnection connection, Packet packet ) : void | ||
connection | IConnection | |
packet | Packet | |
return | void |
public SocketServer ( IServerHandler handler, IEncoder encoder, IDecoder decoder ) : System | ||
handler | IServerHandler | |
encoder | IEncoder | |
decoder | IDecoder | |
return | System |
public SocketServer ( IServerHandler handler, Protocol protocol, int socketBufferSize, int messageBufferSize, int maxMessageSize, int maxConnections ) : System | ||
handler | IServerHandler | |
protocol | Protocol | |
socketBufferSize | int | |
messageBufferSize | int | |
maxMessageSize | int | |
maxConnections | int | |
return | System |