Method | Description | |
---|---|---|
ChannelTcpListener ( ) : System |
|
|
ChannelTcpListener ( Griffin.Net.ChannelTcpListenerConfiguration configuration ) : System |
|
|
Start ( |
Start this listener. This also pre-configures 20 channels that can be used and reused during the lifetime of this listener. |
|
Stop ( ) : void |
Stop the listener.
|
Method | Description | |
---|---|---|
Configure ( Griffin.Net.ChannelTcpListenerConfiguration configuration ) : void |
To allow the sub classes to configure this class in their constructors.
|
|
OnClientConnected ( ITcpChannel channel ) : Griffin.Net.Protocols.ClientConnectedEventArgs |
A client has connected (nothing has been sent or received yet)
|
|
OnClientDisconnected ( ITcpChannel channel, |
A client has disconnected
|
|
OnListenerError ( |
Invoke when the listener itself fails
|
|
OnMessage ( ITcpChannel source, object msg ) : void |
Receive a new message from the specified client
|
Method | Description | |
---|---|---|
OnAcceptSocket ( IAsyncResult ar ) : void | ||
OnChannelDisconnect ( ITcpChannel source, |
public ChannelTcpListener ( Griffin.Net.ChannelTcpListenerConfiguration configuration ) : System | ||
configuration | Griffin.Net.ChannelTcpListenerConfiguration | |
return | System |
protected Configure ( Griffin.Net.ChannelTcpListenerConfiguration configuration ) : void | ||
configuration | Griffin.Net.ChannelTcpListenerConfiguration | |
return | void |
protected OnClientConnected ( ITcpChannel channel ) : Griffin.Net.Protocols.ClientConnectedEventArgs | ||
channel | ITcpChannel | Channel which we created for the remote socket. |
return | Griffin.Net.Protocols.ClientConnectedEventArgs |
protected OnClientDisconnected ( ITcpChannel channel, |
||
channel | ITcpChannel | Channel representing the client that disconnected |
exception |
/// Exception which was used to detect disconnect ( |
|
return | void |
protected OnListenerError ( |
||
ex | Caught exception | |
return | void |
protected OnMessage ( ITcpChannel source, object msg ) : void | ||
source | ITcpChannel | Channel for the client |
msg | object | Message (as decoded by the specified |
return | void |
public Start ( |
||
address | Address to accept connections on | |
port | int | Port to use. Set to |
return | void |