14 #ifndef ECL_DEVICES_SOCKET_SERVER_POS_HPP_ 15 #define ECL_DEVICES_SOCKET_SERVER_POS_HPP_ 29 #include <arpa/inet.h> 30 #include <sys/ioctl.h> 32 #include <sys/socket.h> 34 #include "detail/socket_error_handler_pos.hpp" 35 #include "detail/socket_exception_handler_pos.hpp" 65 SocketServer() : is_open(false) {};
76 SocketServer(
const unsigned int &port_number)
ecl_throw_decl(StandardException);
77 virtual ~SocketServer() { close(); };
92 bool open(
const unsigned int& port_number )
ecl_throw_decl(StandardException);
110 void close() { is_open =
false; ::close(socket_fd); }
112 bool open()
const {
return is_open; }
213 const Error& error()
const {
return error_handler; }
218 int client_socket_fd;
232 class is_sink<SocketServer> :
public True {};
240 class is_source<SocketServer> :
public True {};
248 class is_sourcesink<SocketServer> :
public True {};
#define ecl_throw_decl(exception)
Standard ecl throw exception declaration.
Pre-processed macro definitions that define the target platform.
#define ecl_debug_throw_decl(exception)
Debug mode throw exception declaration.