senf::TCPv4SocketProtocol Class Reference
[Protocol Implementations (Concrete Protocol Classes)]

IPv4 TCP Socket Protocol. More...

#include <senf/Socket/Protocols/INet/TCPSocketHandle.hh>

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

List of all members.


Detailed Description

IPv4 TCP Socket Protocol.
Socket Handle typedefs:
TCPv4ClientSocketHandle (ProtocolClientSocketHandle), TCPv4ServerSocketHandle (ProtocolServerSocketHandle)
Policy Interface:
ClientSocketHandle::read(), ClientSocketHandle::write(), ClientSocketHandle::bind(), ClientSocketHandle::local(), ClientSocketHandle::connect(), ClientSocketHandle::peer()
Address Type:
INet4SocketAddress
TCPv4SocketProtocol provides an internet protocol stream socket based on the TCP protocol and IPv4 addressing.

This class is utilized as the protocol class of the ProtocolClientSocketHandle and ProtocolServerSocketHandle via the Socket Handle typedefs above.

See also:
TCPv6SocketProtocol

Definition at line 81 of file TCPSocketHandle.hh.


Constructors

void  init_client () const
  Create unconnected client socket.
void  init_client (INet4SocketAddress const &address) const
  Create client socket and connect.
void  init_server () const
  Create server socket.
void  init_server (INet4SocketAddress const &address, unsigned backlog=1) const
  Create server socket and listen.

Member Function Documentation

void senf::TCPv4SocketProtocol::
init_client ( INet4SocketAddress const &  address )

Create client socket and connect.

Creates a new client socket and connects to the given address.

Parameters:
[in]  address  remote address to connect to
Note:
This member is implicitly called from the ProtocolClientSocketHandle::ProtocolClientSocketHandle() constructor

Definition at line 54 of file TCPSocketHandle.cc.

void senf::TCPv4SocketProtocol::
init_client ()

Create unconnected client socket.

Note:
This member is implicitly called from the ProtocolClientSocketHandle::ProtocolClientSocketHandle() constructor

Definition at line 44 of file TCPSocketHandle.cc.

void senf::TCPv4SocketProtocol::
init_server ( INet4SocketAddress const &  address,
unsigned  backlog = 1 )

Create server socket and listen.

Creates a new server socket, binds to address end starts listening for new connections with a backlog of backlog connections. It also enables reuseaddr().

Parameters:
[in]  address  address to listen on
[in]  backlog  size of the listen backlog
Note:
This member is implicitly called from the ProtocolServerSocketHandle::ProtocolServerSocketHandle() constructor

Definition at line 70 of file TCPSocketHandle.cc.

void senf::TCPv4SocketProtocol::
init_server ()

Create server socket.

Note:
This member is implicitly called from the ProtocolServerSocketHandle::ProtocolServerSocketHandle() constructor

Definition at line 61 of file TCPSocketHandle.cc.


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