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;
117 virtual bool onAccept(
const IPV4Host &ia, tpport_t port);
119 virtual bool onAccept(
const IPV6Host &ia, tpport_t port);
122 virtual IPV4Host getIPV4Sender(tpport_t *port = NULL)
const;
125 virtual IPV6Host getIPV6Sender(tpport_t *port = NULL)
const;
153 DCCPSocket(
const char *name, Family family = IPV4,
unsigned backlog = 5);
173 void disconnect(
void);
178 bool setCCID(uint8_t ccid);
183 int getTxCCID()
const;
188 int getRxCCID()
const;
193 size_t available()
const;
202 void connect(
const IPV4Host &host, tpport_t port, timeout_t timeout = 0);
204 void connect(
const IPV6Host &host, tpport_t port, timeout_t timeout = 0);
210 void connect(
const char *name);
218 return Socket::isPending(Socket::pendingInput, timeout);