Classes | Typedefs | Enumerations | Functions | Variables
ecl Namespace Reference

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...
 

Variables

 ArgNotSupportedError
 
 BlockingError
 
 BusyError
 
 CloseError
 
 ConfigurationError
 
 ConnectionError
 
 ConnectionRefusedError
 
 ConstructorError
 
 ConversionError
 
 DestructorError
 
 InterruptedError
 
 InvalidArgError
 
 InvalidInputError
 
 InvalidObjectError
 
 IsLockedError
 
 MemoryError
 
 NoError
 
 NotFoundError
 
 NotInitialisedError
 
 NotSupportedError
 
 OpenError
 
 OutOfRangeError
 
 OutOfResourcesError
 
 PermissionsError
 
 PosixError
 
 RaiiError
 
 ReadError
 
 SystemFailureError
 
 TimeOutError
 
 UnknownError
 
 UsageError
 
 WriteError
 

Typedef Documentation

◆ ndfs_t

typedef ::nfds_t ecl::ndfs_t

Definition at line 88 of file poll.hpp.

◆ socket_descriptor

Cross-platform typedef for a socket file descriptor.

Definition at line 58 of file sockets.hpp.

◆ socket_pollfd

typedef struct pollfd ecl::socket_pollfd

Definition at line 87 of file poll.hpp.

Function Documentation

◆ close_socket()

SocketError ecl::close_socket ( const socket_descriptor sock)

Close a socket.

Cross platform api for closing a socket.

Valid return values:

  • NoError,
  • InvalidArgError,
  • InterruptedError,
  • NotInitialisedError (win),
  • SystemFailureError (win),
  • BlockingError (win).
Returns
SocketError : error return value.

Definition at line 49 of file lib/sockets.cpp.

◆ init_sockets()

SocketError ecl::init_sockets ( void  )

Initialise the socket subsystem.

Usually only needed on windows.

Valid return values:

  • NoError,
  • NotInitialisedError (win),
  • NotSupportedError (win),
  • BusyError (win),
  • OutOfResourcesError (win),
  • InvalidArgError (win).
Returns
SocketError : error return value.

Definition at line 27 of file lib/sockets.cpp.

◆ poll_sockets()

int ecl::poll_sockets ( socket_pollfd fds,
nfds_t  nfds,
int  timeout 
)

Definition at line 25 of file lib/poll.cpp.

◆ shutdown_sockets()

SocketError ecl::shutdown_sockets ( )

Shutdown the socket subsystem.

Usually only needed on windows.

Valid return values:

  • NoError,
  • NotInitialisedError (win),
  • SystemFailureError (win),
  • BusyError (win).
Returns
SocketError : error return value.

Definition at line 74 of file lib/sockets.cpp.

◆ socketpair()

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.

Parameters
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).
Returns
SocketError : error return value.

Definition at line 22 of file lib/socketpair.cpp.



ecl_io
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:16:11