IPv6 TCP Socket Protocol. More...

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

Inheritance diagram for senf::TCPv6SocketProtocol:

Constructors

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

Additional Inherited Members

- Public Types inherited from senf::ConcreteSocketProtocol< TCPv6Socket_Policy, TCPv6SocketProtocol >
typedef TCPv6Socket_Policy Policy
 The protocols policy. More...
 
- Public Types inherited from senf::TCPSocketProtocol
enum  ShutType { ShutRD, ShutWR, ShutRDWR }
 
- Public Member Functions inherited from senf::ConcreteSocketProtocol< TCPv6Socket_Policy, TCPv6SocketProtocol >
Policy const & policy () const
 Access the policy instance. More...
 
 ~ConcreteSocketProtocol ()=0
 
- Public Member Functions inherited from senf::SocketProtocol
virtual void terminate () const
 Forcibly close socket. More...
 
virtual void state (SocketStateMap &map, unsigned lod) const
 Return socket state information. More...
 
int fd () const
 Get file descriptor. More...
 
 SocketProtocol ()
 
virtual ~SocketProtocol ()=0
 
- Public Member Functions inherited from senf::TCPSocketProtocol
bool nodelay () const
 Check current SO_NODELAY status. More...
 
void nodelay (bool value) const
 Set SO_NODELAY status. More...
 
unsigned siocinq () const
 Return current size of the input queue. More...
 
unsigned siocoutq () const
 Return current size of the output queue. More...
 
void shutdown (ShutType type) const
 
void close ()
 Close socket. More...
 
unsigned available () const
 Return (maximum) number of bytes available for reading without < blocking. More...
 
bool eof () const
 Check for end-of-file condition. More...
 
- Public Member Functions inherited from senf::INetSocketProtocol
void bindInterface (std::string const &iface) const
 Bind socket to specific interface. More...
 
std::string bindInterface ()
 Get bound interface. More...
 
- Public Member Functions inherited from senf::BSDSocketProtocol
std::pair< bool, unsigned > linger () const
 Return current linger status. More...
 
void linger (bool enable, unsigned timeout=0) const
 Change linger status. More...
 
boost::uint8_t priority () const
 Get packet priority assigned to outgoing packets. More...
 
void priority (boost::uint8_t value) const
 Set packet priority (e.g. TOS) More...
 
int error () const
 Get and clear pending socket error. More...
 
unsigned rcvbuf () const
 Check receive buffer size. More...
 
void rcvbuf (unsigned size) const
 Change receive buffer size. More...
 
unsigned sndbuf () const
 Check send buffer size. More...
 
void sndbuf (unsigned size) const
 Change size of send buffer. More...
 
template<unsigned short N>
void attachSocketFilter (::sock_filter(&filter)[N])
 
void detachSocketFilter ()
 
void mtuDiscovery (int mode) const
 
void rcvLowat (unsigned lowWat) const
 
void sndLowat (unsigned lowWat) const
 
- Public Member Functions inherited from senf::AddressableBSDSocketProtocol
bool reuseaddr () const
 Return current reuseaddr state. More...
 
void reuseaddr (bool value) const
 Set reuseraddr state. More...
 
- Protected Member Functions inherited from senf::ConcreteSocketProtocol< TCPv6Socket_Policy, TCPv6SocketProtocol >
ClientSocketHandle< PolicyclientHandle () const
 Get client handle for associated socket. More...
 
ServerSocketHandle< PolicyserverHandle () const
 Get server handle for associated socket. More...
 
- Protected Member Functions inherited from senf::SocketProtocol
FileHandle fh () const
 Get a FileHandle for this instance. More...
 
void fd (int) const
 Initialize file descriptor. More...
 

Detailed Description

IPv6 TCP Socket Protocol.

Socket Handle typedefs:
TCPv6ClientSocketHandle (ProtocolClientSocketHandle), TCPv6ServerSocketHandle (ProtocolServerSocketHandle)
Policy Interface:
ClientSocketHandle::read(), ClientSocketHandle::write(), ClientSocketHandle::bind(), ClientSocketHandle::local(), ClientSocketHandle::connect(), ClientSocketHandle::peer()
Address Type:
INet6Address

TCPv6SocketProtocol provides an internet protocol stream socket based on the TCP protocol and IPv6 addressing.

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

See also
TCPv4SocketProtocol

Definition at line 146 of file TCPSocketHandle.hh.

Member Function Documentation

◆ init_client() [1/2]

void senf::TCPv6SocketProtocol::init_client ( ) const

Create unconnected client socket.

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

Definition at line 75 of file TCPSocketHandle.cc.

◆ init_client() [2/2]

void senf::TCPv6SocketProtocol::init_client ( INet6SocketAddress const &  address) const

Create client socket and connect.

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

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

Definition at line 85 of file TCPSocketHandle.cc.

◆ init_server() [1/2]

void senf::TCPv6SocketProtocol::init_server ( ) const

Create server socket.

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

Definition at line 92 of file TCPSocketHandle.cc.

◆ init_server() [2/2]

void senf::TCPv6SocketProtocol::init_server ( INet6SocketAddress const &  address,
unsigned  backlog = 1 
) const

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]addressaddress to listen on
[in]backlogsize of the listen backlog
Note
This member is implicitly called from the ProtocolServerSocketHandle::ProtocolServerSocketHandle() constructor

Definition at line 101 of file TCPSocketHandle.cc.


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