Свойство | Тип | Описание | |
---|---|---|---|
ConnectedSockets | HttpSocket>.Dictionary | ||
LocalPort | int |
Метод | Описание | |
---|---|---|
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
|
Метод | Описание | |
---|---|---|
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 | |
Результат | void |
protected CheckSockets ( object eventState ) : void | ||
eventState | object | |
Результат | void |
protected CloseSocket ( |
||
state | ||
Результат | void |
public Start ( OnNewClient onConnection ) : void | ||
onConnection | OnNewClient | |
Результат | void |
protected StartListening ( Socket &ListeningSocket ) : void | ||
ListeningSocket | Socket | |
Результат | 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. /// |
Результат | System |
protected Dictionary |
||
Результат | HttpSocket>.Dictionary |