Property | Type | Description | |
---|---|---|---|
ConnectedSockets | HttpSocket>.Dictionary | ||
LocalPort | int |
Method | Description | |
---|---|---|
Start ( OnNewClient onConnection ) : void |
Spawn a thread that listens to incoming connections
|
|
Stop ( ) : void |
Stop the listening threads and close the client sockets
|
|
TcpServer ( int localPort, bool bUseIPv6 ) : System |
Initialize, but do not start, a multi-threaded TCP server listening for localhost connections only
|
Method | Description | |
---|---|---|
AcceptCallback ( IAsyncResult ar ) : void |
Callback method for accepting new connections
|
|
CheckSockets ( object eventState ) : void |
Close broken sockets This function is called regularly to clean up the list of connected sockets. |
|
CloseSocket ( |
Remove the socket contained in the given state object from the connected array list and hash table, then close the socket
|
|
Pause ( ) : void | ||
StartListening ( Socket &ListeningSocket ) : void |
Open a listener socket and wait for connections
|
|
StartThread ( ) : void |
protected AcceptCallback ( IAsyncResult ar ) : void | ||
ar | IAsyncResult | |
return | void |
protected CheckSockets ( object eventState ) : void | ||
eventState | object | |
return | void |
protected CloseSocket ( |
||
state | ||
return | void |
public Start ( OnNewClient onConnection ) : void | ||
onConnection | OnNewClient | |
return | void |
protected StartListening ( Socket &ListeningSocket ) : void | ||
ListeningSocket | Socket | |
return | void |
public TcpServer ( int localPort, bool bUseIPv6 ) : System | ||
localPort | int | TCP port to listen to |
bUseIPv6 | bool | /// If true, listen on ::1 only. If false, listen on 127.0.0.1 only. /// |
return | System |
protected Dictionary |
||
return | HttpSocket>.Dictionary |