#include <senf/Socket/CommunicationPolicy.hh>
The ConnectedCommunicationPolicy provides support for standard BSD socket API based connected communication. It provides the server side listen() and accept() members.
Definition at line 52 of file CommunicationPolicy.hh.
Static Public Member Functions |
|
template<class SPolicy > | |
static void | listen (ServerSocketHandle< SPolicy > const &handle, unsigned backlog) |
Enable establishing new connections on the socket. |
|
template<class SPolicy > | |
static int | accept (ServerSocketHandle< SPolicy > const &handle, typename ServerSocketHandle< SPolicy >::Address &address) |
accept a new connection on the socket. |
|
static int | accept (FileHandle const &handle) |
accept a new connection on the socket. |
int senf::ConnectedCommunicationPolicy:: | ||||
accept | ( | FileHandle const & | handle | ) |
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.
[in] | handle | socket handle to accept connection on |
Definition at line 31 of file CommunicationPolicy.cci.
int senf::ConnectedCommunicationPolicy:: | ||||
accept | ( | ServerSocketHandle< SPolicy > const & | handle, | |
typename ServerSocketHandle< SPolicy >::Address & | address | ) | ||
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.
[in] | handle | socket handle to accept connection on |
[out] | address | address of newly connected remote peer |
Definition at line 61 of file CommunicationPolicy.cti.
void senf::ConnectedCommunicationPolicy:: | ||||
listen | ( | ServerSocketHandle< SPolicy > const & | handle, | |
unsigned | backlog | ) | ||
Enable establishing new connections on the socket.
[in] | handle | socket handle to enable reception on |
[in] | backlog | size of backlog queue |
Definition at line 45 of file CommunicationPolicy.cti.