ost::DCCPSocket(3) | Library Functions Manual | ost::DCCPSocket(3) |
NAME¶
ost::DCCPSocket - DCCP sockets are used for stream based connected sessions between two sockets.SYNOPSIS¶
#include <socket.h> Inherits ost::Socket.Public Member Functions¶
virtual bool onAccept (const IPV4Host &ia, tpport_t port)
Additional Inherited Members¶
Detailed Description¶
DCCP sockets are used for stream based connected sessions between two sockets.Leandro Sales leandroal@gmail.com
Heverton Stuart hevertonsns@gmail.com bound server for DCCP streams and
sessions.
Constructor & Destructor Documentation¶
ost::DCCPSocket::DCCPSocket (const IPV4Address &bind, tpport_tport, unsignedbacklog = 5)¶
A DCCP 'server' is created as a DCCP socket that is bound to a hardware address and port number on the local machine and that has a backlog queue to listen for remote connection requests. If the server cannot be created, an exception is thrown. Parameters:bind local ip address or interface to
use.
port number to bind socket under.
backlog size of connection request queue.
ost::DCCPSocket::DCCPSocket (const IPV6Address &bind, tpport_tport, unsignedbacklog = 5)¶
ost::DCCPSocket::DCCPSocket (const char *name, Familyfamily = IPV4, unsignedbacklog = 5)¶
Create a named dccp socket by service and/or interface id. For IPV4 we use [host:]svc or [host/]svc for the string. If we have getaddrinfo, we use that to obtain the addr to bind for. Parameters:name of host interface and service port
to bind.
backlog size of connection request queue.
ost::DCCPSocket::DCCPSocket (Familyfamily = IPV4)¶
Create an unconnected ephemeral DCCP client socket.ost::DCCPSocket::DCCPSocket (DCCPSocket &server, timeout_ttimeout = 0)¶
Create a server session by accepting a DCCP Socket.virtual ost::DCCPSocket::~DCCPSocket () [virtual]¶
Use base socket handler for ending this socket.Member Function Documentation¶
size_t ost::DCCPSocket::available ()¶
Return number of bytes to be read.void ost::DCCPSocket::connect (const IPV4Host &host, tpport_tport, timeout_ttimeout = 0)¶
Create a DCCP client connection to a DCCP socket (on a remote machine). Parameters:host address of remote DCCP server.
port number to connect.
void ost::DCCPSocket::connect (const IPV6Host &host, tpport_tport, timeout_ttimeout = 0)¶
void ost::DCCPSocket::connect (const char *name)¶
Connect to a named client.void ost::DCCPSocket::disconnect (void)¶
Disconnect active dccp connection (client use).virtual IPV4Host ost::DCCPSocket::getIPV4Sender (tpport_t *port = NULL) const [virtual]¶
Reimplemented from ost::Socket.virtual IPV6Host ost::DCCPSocket::getIPV6Sender (tpport_t *port = NULL) const [virtual]¶
Reimplemented from ost::Socket.int ost::DCCPSocket::getRxCCID ()¶
Get RX CCID DCCP.int ost::DCCPSocket::getTxCCID ()¶
Get TX CCID DCCP.bool ost::DCCPSocket::isPendingConnection (timeout_ttimeout = TIMEOUT_INF) [inline]¶
Used to wait for pending connection requests. Returns:true if data packets available.
Parameters:
timeout in milliseconds. TIMEOUT_INF if
not specified.
virtual bool ost::DCCPSocket::onAccept (const IPV4Host &ia, tpport_tport) [virtual]¶
A method to call in a derived DCCPSocket class that is acting as a server when a connection request is being accepted. The server can implement protocol specific rules to exclude the remote socket from being accepted by returning false. The Peek method can also be used for this purpose. Returns:true if client should be accepted.
Parameters:
ia internet host address of the client.
port number of the client.
virtual bool ost::DCCPSocket::onAccept (const IPV6Host &ia, tpport_tport) [virtual]¶
void ost::DCCPSocket::reject (void)¶
Used to reject the next incoming connection request.bool ost::DCCPSocket::setCCID (uint8ccid)¶
Set CCID DCCP.Member Data Documentation¶
struct sockaddr_in ost::DCCPSocket::ipv4¶
struct sockaddr_in6 ost::DCCPSocket::ipv6¶
Author¶
Generated automatically by Doxygen for GNU CommonC++ from the source code.Sat Jun 23 2012 | GNU CommonC++ |