TcpMsgServer is implemented by the cxMessage2 library to represent a server that listens on a port and accepts connections from any number of TcpMsgClients.
TcpMsgServer* CreateTcpMsgServer(
IoContextPool* pool,
EProtocol protocol,
int port,
bool reuse_addr,
ITcpMsgEndPoint& ep,
const TcpMsgSessionSettings& sessionSettings)
Create a server that will listen on the given port using the given EProtocol. It will use the given IoContextPool.
For each successful connection the given ITcpMsgEndPoint is used to process socket connections as they are accepted.
The given TcpMsgSessionSettings are used for each created TcpMsgSession.
Never returns nullptr.
void Close(TcpMsgServer*)
Close the given TcpMsgClient.