29 #ifndef RGJ_FREE_THREADS_SERVER_H_ 30 #define RGJ_FREE_THREADS_SERVER_H_ 32 #include <skstream/sksocket.h> 41 static const int SK_SRV_NONE = 0;
42 static const int SK_SRV_PURE = 1 << 0;
43 static const int SK_SRV_REUSE = 1 << 1;
53 int flags = SK_SRV_NONE)
54 : _socket(_sock), _flags(flags) {
62 virtual SOCKET_TYPE getSocket()
const;
79 int bindToAddressInfo(
struct addrinfo *);
80 int bindToIpService(
int service,
int type,
int protocol);
83 int flags = SK_SRV_NONE) :
105 SOCKET_TYPE accept();
107 int open(
int service);
108 int open(
struct addrinfo *);
125 int open(
int service);
129 #endif // RGJ_FREE_THREADS_SERVER_H_ Base class for anything that encapsulates a socket.
Definition: sksocket.h:79
Base class for anything that encapsulates a listen socket.
Definition: skserver.h:39
Base class for anything that encapsulates an IP listen socket.
Definition: skserver.h:77
Encapsulates a TCP/IP stream listen socket.
Definition: skserver.h:95
bool can_accept()
See if accept() can be called without blocking on it.
Definition: skserver.cpp:108
Encapsulates a UDP/IP datagram listen socket.
Definition: skserver.h:116