Classes | |
class | Error |
class | SocketError |
Extends the generic error handler with socket specific error strings. More... | |
Typedefs | |
typedef ::nfds_t | ndfs_t |
typedef int | socket_descriptor |
Cross-platform typedef for a socket file descriptor. More... | |
typedef struct pollfd | socket_pollfd |
Enumerations | |
enum | ErrorFlag |
Functions | |
ecl_io_PUBLIC SocketError | close_socket (const socket_descriptor &sock) |
Close a socket. More... | |
ecl_io_PUBLIC SocketError | init_sockets () |
Initialise the socket subsystem. More... | |
bool | is_big_endian () |
bool | is_char_signed () |
ecl_io_PUBLIC int | poll_sockets (socket_pollfd *fds, nfds_t nfds, int timeout) |
ecl_io_PUBLIC SocketError | shutdown_sockets () |
Shutdown the socket subsystem. More... | |
ecl_io_PUBLIC SocketError | socketpair (socket_descriptor socket_fd_pair[2], const bool non_blocking=false) |
Creates a socket pair internal to the current process. More... | |
typedef ::nfds_t ecl::ndfs_t |
typedef int ecl::socket_descriptor |
Cross-platform typedef for a socket file descriptor.
Definition at line 58 of file sockets.hpp.
typedef struct pollfd ecl::socket_pollfd |
SocketError ecl::close_socket | ( | const socket_descriptor & | sock | ) |
Close a socket.
Cross platform api for closing a socket.
Valid return values:
Definition at line 49 of file lib/sockets.cpp.
SocketError ecl::init_sockets | ( | void | ) |
Initialise the socket subsystem.
Usually only needed on windows.
Valid return values:
Definition at line 27 of file lib/sockets.cpp.
int ecl::poll_sockets | ( | socket_pollfd * | fds, |
nfds_t | nfds, | ||
int | timeout | ||
) |
Definition at line 25 of file lib/poll.cpp.
SocketError ecl::shutdown_sockets | ( | ) |
Shutdown the socket subsystem.
Usually only needed on windows.
Valid return values:
Definition at line 74 of file lib/sockets.cpp.
SocketError ecl::socketpair | ( | socket_descriptor | socket_fd_pair[2], |
const bool | non_blocking = false |
||
) |
Creates a socket pair internal to the current process.
Valid return values are quite simplified. On posix they'll return a variety of arguments similar to the posix return values, on windows it will only return ConfigurationError if something went wrong. This can be expanded in further detail if necessary.
socket_fd_pair | : pair of file descriptors for the sockets to be opened. |
non_blocking | : set the pair to be non-blocking(true) or blocking (false). |
Definition at line 22 of file lib/socketpair.cpp.