29 #include <tacopie/utils/typedefs.hpp> 66 tcp_socket(fd_t fd,
const std::string& host, std::uint32_t port,
type t);
99 std::vector<char>
recv(std::size_t size_to_read);
109 std::size_t
send(
const std::vector<char>& data, std::size_t size_to_write);
119 void connect(
const std::string& host, std::uint32_t port, std::uint32_t timeout_msecs = 0);
128 void bind(
const std::string& host, std::uint32_t port);
136 void listen(std::size_t max_connection_queue);
155 const std::string&
get_host(
void)
const;
192 void create_socket_if_necessary(
void);
200 void check_or_set_type(
type t);
215 std::uint32_t m_port;
type get_type(void) const
void connect(const std::string &host, std::uint32_t port, std::uint32_t timeout_msecs=0)
Definition: tcp_socket.hpp:38
std::uint32_t get_port(void) const
~tcp_socket(void)=default
dtor
type
Definition: tcp_socket.hpp:46
tcp_socket & operator=(const tcp_socket &)=delete
assignment operator
Definition: io_service.hpp:48
bool operator==(const tcp_socket &rhs) const
void listen(std::size_t max_connection_queue)
const std::string & get_host(void) const
std::size_t send(const std::vector< char > &data, std::size_t size_to_write)
bool operator!=(const tcp_socket &rhs) const
void bind(const std::string &host, std::uint32_t port)
std::vector< char > recv(std::size_t size_to_read)