CommunicationPolicy for connected sockets.
More...
#include <senf/Socket/CommunicationPolicy.hh>
CommunicationPolicy for connected sockets.
The ConnectedCommunicationPolicy provides support for standard BSD socket API based connected communication. It provides the server side listen() and accept() members.
Definition at line 42 of file CommunicationPolicy.hh.
◆ accept() [1/2]
accept a new connection on the socket.
The accept() member will return a new client file descriptor. This file descriptor will be used by the ServerSocketHandle implementation to build a new ClientSocketHandle for the new connection.
- Parameters
-
[in] | handle | socket handle to accept connection on |
[out] | address | address of newly connected remote peer |
- Returns
- file descriptor of new client socket
◆ accept() [2/2]
static int senf::ConnectedCommunicationPolicy::accept |
( |
FileHandle const & |
handle | ) |
|
|
static |
accept a new connection on the socket.
The accept() member will return a new client file descriptor. This file descriptor will be used by the ServerSocketHandle implementation to build a new ClientSocketHandle for the new connection.
- Parameters
-
[in] | handle | socket handle to accept connection on |
- Returns
- file descriptor of new client socket
◆ listen()
template<class SPolicy >
static void senf::ConnectedCommunicationPolicy::listen |
( |
ServerSocketHandle< SPolicy > const & |
handle, |
|
|
unsigned |
backlog |
|
) |
| |
|
static |
Enable establishing new connections on the socket.
- Parameters
-
[in] | handle | socket handle to enable reception on |
[in] | backlog | size of backlog queue |
The documentation for this struct was generated from the following files: