libcmutils 0.6.5
Multi-platform C99 utility library
Loading...
Searching...
No Matches
CMUTIL_ServerSocket Struct Reference

Server socket object. More...

Data Fields

CMSocketResult(* Accept )(const CMUTIL_ServerSocket *server, CMUTIL_Socket **res, long timeout)
 Accept a new connection on the server socket.
 
void(* Close )(CMUTIL_ServerSocket *server)
 Close the server socket.
 
void(* SetSilent )(CMUTIL_ServerSocket *socket, CMBool silent)
 Suppress this library's own error logging on this listener.
 

Detailed Description

Server socket object.

Field Documentation

◆ Accept

CMSocketResult(* CMUTIL_ServerSocket::Accept) (const CMUTIL_ServerSocket *server, CMUTIL_Socket **res, long timeout)

Accept a new connection on the server socket.

This function accepts a new incoming connection on the server socket within the specified timeout period and returns the accepted socket.

Parameters
serverThe server socket object to accept connections from.
resPointer to store the accepted socket object.
timeoutThe accept operation timeout in milliseconds.
Returns
CMSocketResult indicating success or failure.

◆ Close

void(* CMUTIL_ServerSocket::Close) (CMUTIL_ServerSocket *server)

Close the server socket.

This function closes the server socket and releases any associated resources.

Parameters
serverThe server socket object to be closed.

◆ SetSilent

void(* CMUTIL_ServerSocket::SetSilent) (CMUTIL_ServerSocket *socket, CMBool silent)

Suppress this library's own error logging on this listener.

Behaves like CMUTIL_Socket::SetSilent, and does not affect the sockets handed out by Accept.

Parameters
socketThe server socket object.
silentCMTrue to stop logging errors for this listener.

The documentation for this struct was generated from the following file: