44 #ifndef COMMONCPP_DCCP_H_
45 #define COMMONCPP_DCCP_H_
49 #ifndef COMMONCPP_CONFIG_H_
50 #include <commoncpp/config.h>
53 #ifndef COMMONCPP_STRING_H_
57 #ifndef COMMONCPP_ADDRESS_H_
61 #ifndef COMMONCPP_SOCKET_H_
97 struct sockaddr_in ipv4;
99 struct sockaddr_in6 ipv6;
153 DCCPSocket(
const char *name, Family family = IPV4,
unsigned backlog = 5);
218 return Socket::isPending(Socket::pendingInput, timeout);
The network name and address objects are all derived from a common IPV6Address base class.
DCCPSocket(Family family=IPV4)
Create an unconnected ephemeral DCCP client socket.
virtual ~DCCPSocket()
Use base socket handler for ending this socket.
void connect(const IPV4Host &host, tpport_t port, timeout_t timeout=0)
Create a DCCP client connection to a DCCP socket (on a remote machine).
Network addresses and sockets related classes.
Common C++ generic string class.
DCCP sockets are used for stream based connected sessions between two sockets.
size_t available() const
Return number of bytes to be read.
int getTxCCID() const
Get TX CCID DCCP.
bool setCCID(uint8_t ccid)
Set CCID DCCP.
The network name and address objects are all derived from a common IPV4Address base class.
DCCPSocket(const char *name, Family family=IPV4, unsigned backlog=5)
Create a named dccp socket by service and/or interface id.
This object is used to hold the actual and valid internet address of a specific host machine that wil...
in_port_t tpport_t
Transport Protocol Ports.
bool isPendingConnection(timeout_t timeout=ucommon::Timer::inf)
Used to wait for pending connection requests.
void reject(void)
Used to reject the next incoming connection request.
void connect(const char *name)
Connect to a named client.
void disconnect(void)
Disconnect active dccp connection (client use).
int getRxCCID() const
Get RX CCID DCCP.
virtual bool onAccept(const IPV4Host &ia, tpport_t port)
A method to call in a derived DCCPSocket class that is acting as a server when a connection request i...
DCCPSocket(DCCPSocket &server, timeout_t timeout=0)
Create a server session by accepting a DCCP Socket.
This object is used to hold the actual and valid internet address of a specific host machine that wil...
DCCPSocket(const IPV4Address &bind, tpport_t port, unsigned backlog=5)
A DCCP "server" is created as a DCCP socket that is bound to a hardware address and port number on th...