1#ifndef RAW_SOCKET_CLASS
2#define RAW_SOCKET_CLASS
126 fd_set_wrapper &write_list, fd_set_wrapper &exceptions)
const;
138 int inner_select(
basis::un_int socket,
int selection_mode,
int timeout,
139 fd_set_wrapper &read_list, fd_set_wrapper &write_list,
140 fd_set_wrapper &exceptions)
const;
209 typedef char sock_hop;
210 typedef int socklen_t;
212 // provide close to the real BSD error names using windows values.
213 #define SOCK_EACCES WSAEACCES
214 #define SOCK_EADDRINUSE WSAEADDRINUSE
215 #define SOCK_EADDRNOTAVAIL WSAEADDRNOTAVAIL
216 #define SOCK_EAFNOSUPPORT WSAEAFNOSUPPORT
217 #define SOCK_EALREADY WSAEALREADY
218 #define SOCK_EBADF WSAEBADF
219 #define SOCK_ECONNABORTED WSAECONNABORTED
220 #define SOCK_ECONNREFUSED WSAECONNREFUSED
221 #define SOCK_ECONNRESET WSAECONNRESET
222 #define SOCK_EDESTADDRREQ WSAEDESTADDRREQ
223 #define SOCK_EDQUOT WSAEDQUOT
224 #define SOCK_EFAULT WSAEFAULT
225 #define SOCK_EHOSTDOWN WSAEHOSTDOWN
226 #define SOCK_EHOSTUNREACH WSAEHOSTUNREACH
227 #define SOCK_EINPROGRESS WSAEINPROGRESS
228 #define SOCK_EINTR WSAEINTR
229 #define SOCK_EINVAL WSAEINVAL
230 #define SOCK_EISCONN WSAEISCONN
231 #define SOCK_ELOOP WSAELOOP
232 #define SOCK_EMFILE WSAEMFILE
233 #define SOCK_EMSGSIZE WSAEMSGSIZE
234 #define SOCK_ENAMETOOLONG WSAENAMETOOLONG
235 #define SOCK_ENETDOWN WSAENETDOWN
236 #define SOCK_ENETUNREACH WSAENETUNREACH
237 #define SOCK_ENETRESET WSAENETRESET
238 #define SOCK_ENOBUFS WSAENOBUFS
239 #define SOCK_ENOPROTOOPT WSAENOPROTOOPT
240 #define SOCK_ENOTCONN WSAENOTCONN
241 #define SOCK_ENOTEMPTY WSAENOTEMPTY
242 #define SOCK_ENOTSOCK WSAENOTSOCK
243 #define SOCK_EOPNOTSUPP WSAEOPNOTSUPP
244 #define SOCK_EPFNOSUPPORT WSAEPFNOSUPPORT
245 #define SOCK_EPROCLIM WSAEPROCLIM
246 #define SOCK_EPROTOTYPE WSAEPROTOTYPE
247 #define SOCK_EPROTONOSUPPORT WSAEPROTONOSUPPORT
248 #define SOCK_EREMOTE WSAEREMOTE
249 #define SOCK_ESHUTDOWN WSAESHUTDOWN
250 #define SOCK_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
251 #define SOCK_ESTALE WSAESTALE
252 #define SOCK_ETIMEDOUT WSAETIMEDOUT
253 #define SOCK_ETOOMANYREFS WSAETOOMANYREFS
254 #define SOCK_EUSERS WSAEUSERS
256 // windows specific names.
257 #define SOCK_EWOULDBLOCK WSAEWOULDBLOCK
258 #define SOCK_HOST_NOT_FOUND WSAHOST_NOT_FOUND
259 #define SOCK_NO_DATA WSANO_DATA
260 #define SOCK_NO_RECOVERY WSANO_RECOVERY
261 #define SOCK_NOTINITIALISED WSANOTINITIALISED
262 #define SOCK_SYSNOTREADY WSASYSNOTREADY
263 #define SOCK_TRY_AGAIN WSATRY_AGAIN
264 #define SOCK_VERNOTSUPPORTED WSAVERNOTSUPPORTED
Provides a dynamically resizable ASCII character string.
A simple object that wraps a templated array of ints.
DEFINE_CLASS_NAME("raw_socket")
bool set_nagle_algorithm(basis::un_int socket, bool use_nagle=true)
int select(basis::un_int socket, int selection_mode, int timeout=0) const
int analyze_select_result(basis::un_int socket, int mode, fd_set_wrapper &read_list, fd_set_wrapper &write_list, fd_set_wrapper &exceptions) const
bool set_reuse_address(basis::un_int socket, bool reuse=true)
int ioctl(basis::un_int socket, int request, void *argp) const
bool set_keep_alive(basis::un_int socket, bool keep_alive=true)
static basis::astring interest_name(int to_name)
bool set_broadcast(basis::un_int socket, bool broadcasting=true)
bool set_non_blocking(basis::un_int socket, bool non_blocking=true)
Helpful functions for interacting with TCP/IP stacks.
unsigned int un_int
Abbreviated name for unsigned integers.
Provides access to the operating system's socket methods.