47 #ifndef __sockpp_connector_h 48 #define __sockpp_connector_h 122 template <
typename STREAM_SOCK,
typename ADDR=
typename STREAM_SOCK::addr_t>
191 #endif // __sockpp_connector_h Generic socket address.
Definition: sock_address.h:64
STREAM_SOCK stream_sock_t
The type of streaming socket from the acceptor.
Definition: connector.h:134
stream_socket & operator=(stream_socket &&rhs)
Move assignment.
Definition: stream_socket.h:122
connector_tmpl()
Creates an unconnected connector.
Definition: connector.h:141
sock_address_any address() const
Gets the local address to which the socket is bound.
Class to create a client stream connection.
Definition: connector.h:63
Class to create a client TCP connection.
Definition: connector.h:123
Base class for streaming sockets, such as TCP and Unix Domain.
Definition: stream_socket.h:62
bool connect(const addr_t &addr)
Attempts to connects to the specified server.
Definition: connector.h:184
addr_t peer_address() const
Gets the address of the remote peer, if this socket is connected.
Definition: connector.h:168
connector()
Creates an unconnected connector.
Definition: connector.h:76
bool connect(const sock_address &addr)
Attempts to connect to the specified server.
connector_tmpl(const addr_t &addr)
Creates the connector and attempts to connect to the specified address.
Definition: connector.h:147
stream_socket()
Creates an unconnected streaming socket.
Definition: stream_socket.h:85
bool bind(const sock_address &addr)
Binds the socket to the specified address.
connector(connector &&conn)
Move constructor.
Definition: connector.h:88
connector & operator=(connector &&rhs)
Move assignment.
Definition: connector.h:94
bool is_open() const
Determines if the socket is open (valid).
Definition: socket.h:238
connector_tmpl & operator=(connector_tmpl &&rhs)
Move assignment.
Definition: connector.h:153
Definition: acceptor.h:51
bool is_connected() const
Determines if the socket connected to a remote host.
Definition: connector.h:106
connector(const sock_address &addr)
Creates the connector and attempts to connect to the specified address.
Definition: connector.h:82
sock_address_any peer_address() const
Gets the address of the remote peer, if this socket is connected.
addr_t address() const
Gets the local address to which the socket is bound.
Definition: connector.h:162
bool bind(const addr_t &addr)
Binds the socket to the specified address.
Definition: connector.h:176
Generic address class for sockpp.
ADDR addr_t
The type of address for the connector.
Definition: connector.h:136
Classes for stream sockets.