14 #ifndef ECL_DEVICES_SOCKET_SERVER_POS_HPP_ 15 #define ECL_DEVICES_SOCKET_SERVER_POS_HPP_ 21 #include <ecl/config/ecl.hpp> 29 #include <arpa/inet.h> 30 #include <sys/ioctl.h> 32 #include <sys/socket.h> 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; }
208 int listen() ecl_throw_decl(StandardException);
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 {};
Embedded control libraries.
#define ecl_throw_decl(exception)
Defines error handlers for posix sockets.
#define ecl_debug_throw_decl(exception)
Defines exception handlers for posix sockets.