senf::ConnectedCommunicationPolicy Struct Reference
[Policy Implementation classes]

CommunicationPolicy for connected sockets. More...

#include <senf/Socket/CommunicationPolicy.hh>

Inheritance diagram for senf::ConnectedCommunicationPolicy:
Inheritance graph
[legend]

List of all members.


Detailed Description

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 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.

Member Function Documentation

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.

Parameters:
[in]  handle  socket handle to accept connection on
Returns:
file descriptor of new client socket

Definition at line 31 of file CommunicationPolicy.cci.

template<class SPolicy >
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.

Parameters:
[in]  handle  socket handle to accept connection on
[out]  address  address of newly connected remote peer
Returns:
file descriptor of new client socket

Definition at line 61 of file CommunicationPolicy.cti.

template<class SPolicy >
void senf::ConnectedCommunicationPolicy::
listen ( ServerSocketHandle< SPolicy > const &  handle,
unsigned  backlog )

Enable establishing new connections on the socket.

Parameters:
[in]  handle  socket handle to enable reception on
[in]  backlog  size of backlog queue

Definition at line 45 of file CommunicationPolicy.cti.


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