#include <network_ip_tcp.h>
An asynchronous TCP server.
Public Types | |
using | AcceptCompletionHandler = Delegate< Result< void >(Result< void >, NetworkTcpConnectionRef)> |
Public Member Functions | |
MAXON_METHOD Result< void > | Start () |
MAXON_METHOD void | Stop () |
MAXON_METHOD Bool | IsStopped () const |
MAXON_METHOD NetworkIpAddrPort | GetLocalAddress () const |
MAXON_METHOD AioServiceRef | GetIoService () const |
MAXON_METHOD JobQueueRef | GetJobQueue () const |
Private Member Functions | |
MAXON_INTERFACE (NetworkTcpServerInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.networktcpserver") | |
Private Member Functions inherited from AioReaderInterface | |
MAXON_METHOD Result< void > | NotifyForRead (SocketT sockfd, Result< void > result) |
using AcceptCompletionHandler = Delegate<Result<void>(Result<void>, NetworkTcpConnectionRef)> |
|
private |
MAXON_METHOD Result<void> Start | ( | ) |
Starts the server. Returns an error if the server was already started, or if it failed to set up a listening socket. After the server is successfully started, it will accept incoming connections.
MAXON_METHOD void Stop | ( | ) |
Stops the server. Afterwards the server no longer accepts incoming connections.
MAXON_METHOD Bool IsStopped | ( | ) | const |
Returns true if the server is not started.
MAXON_METHOD NetworkIpAddrPort GetLocalAddress | ( | ) | const |
Returns the actual address of the local endpoint this server is bound to.
MAXON_METHOD AioServiceRef GetIoService | ( | ) | const |
Returns the I/O service that processes I/O operations of this server.
MAXON_METHOD JobQueueRef GetJobQueue | ( | ) | const |
Returns the job queue that runs completion handlers of this server.