14 #ifndef ECL_DEVICES_SOCKET_CLIENT_POS_HPP_ 15 #define ECL_DEVICES_SOCKET_CLIENT_POS_HPP_ 21 #include <ecl/config/ecl.hpp> 30 #include <arpa/inet.h> 33 #include <sys/ioctl.h> 34 #include <sys/socket.h> 35 #include <ecl/exceptions/macros.hpp> 36 #include <ecl/exceptions/standard_exception.hpp> 37 #include "socket_connection_status.hpp" 38 #include "detail/socket_error_handler_pos.hpp" 69 SocketClient() : is_open(false), error_handler(
NoError) {};
81 SocketClient(
const std::string &host_name,
const unsigned int &port_number = 5555)
ecl_throw_decl(StandardException);
82 virtual ~SocketClient() { close(); }
98 bool open(
const std::string &hostname,
const unsigned int& port_number )
ecl_throw_decl(StandardException);
101 bool open()
const {
return is_open; }
191 const Error& error()
const {
return error_handler; }
194 std::string hostname;
210 class is_sink<SocketClient> :
public True {};
218 class is_source<SocketClient> :
public True {};
226 class is_sourcesink<SocketClient> :
public True {};
#define ecl_throw_decl(exception)
Standard ecl throw exception declaration.
The primary error handler for ecl libraries.
#define ecl_debug_throw_decl(exception)
Debug mode throw exception declaration.