NetworkTcpServerInterface Class Reference

#include <network_ip_tcp.h>

Inheritance diagram for NetworkTcpServerInterface:

详细描述

An asynchronous TCP server.

Public Types

using  AcceptCompletionHandler = Delegate < Result < void >( Result < void >, NetworkTcpConnectionRef)>

公共成员函数

MAXON_METHOD Result < void >  开始 ()
MAXON_METHOD void  Stop ()
MAXON_METHOD Bool   IsStopped () const
MAXON_METHOD NetworkIpAddrPort   GetLocalAddress () const
MAXON_METHOD AioServiceRef  GetIoService () const
MAXON_METHOD JobQueueRef   GetJobQueue () const

私有成员函数

  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)

Member Typedef Documentation

◆  AcceptCompletionHandler

using AcceptCompletionHandler = Delegate < Result <void>( Result <void>, NetworkTcpConnectionRef)>

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( NetworkTcpServerInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.interface.networktcpserver"   
)
private

◆  Start()

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.

◆  Stop()

MAXON_METHOD void Stop ( )

Stops the server. Afterwards the server no longer accepts incoming connections.

◆  IsStopped()

MAXON_METHOD Bool IsStopped ( ) const

Returns true if the server is not started.

◆  GetLocalAddress()

MAXON_METHOD NetworkIpAddrPort GetLocalAddress ( ) const

Returns the actual address of the local endpoint this server is bound to.

◆  GetIoService()

MAXON_METHOD AioServiceRef GetIoService ( ) const

Returns the I/O service that processes I/O operations of this server.

◆  GetJobQueue()

MAXON_METHOD JobQueueRef GetJobQueue ( ) const

Returns the job queue that runs completion handlers of this server.