|
join 1.0
lightweight network framework library
|
socket stream class. More...
#include <socketstream.hpp>


Public Types | |
| using | SocketStreambuf = BasicSocketStreambuf <Protocol> |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
Public Member Functions | |
| BasicSocketStream () | |
| default constructor. | |
| BasicSocketStream (const BasicSocketStream &other)=delete | |
| copy constructor. | |
| BasicSocketStream & | operator= (const BasicSocketStream &other)=delete |
| copy assignment operator. | |
| BasicSocketStream (BasicSocketStream &&other) | |
| move constructor. | |
| BasicSocketStream & | operator= (BasicSocketStream &&other) |
| move assignment operator. | |
| virtual | ~BasicSocketStream ()=default |
| destroy the socket stream instance. | |
| virtual void | bind (const Endpoint &endpoint) |
| assigns the specified endpoint to the socket. | |
| virtual void | connect (const Endpoint &endpoint) |
| make a connection to the given endpoint. | |
| virtual void | disconnect () |
| shutdown the connection. | |
| virtual void | close () |
| close the connection. | |
| Endpoint | localEndpoint () |
| determine the local endpoint associated with this socket. | |
| const Endpoint & | remoteEndpoint () |
| determine the remote endpoint associated with this socket. | |
| bool | opened () |
| check if the socket is opened. | |
| bool | connected () |
| check if the socket is connected. | |
| bool | encrypted () |
| check if the socket is secure. | |
| void | timeout (int ms) |
| set the socket timeout. | |
| int | timeout () const |
| get the current timeout in milliseconds. | |
| Socket & | socket () |
| get the nested socket. | |
Protected Attributes | |
| SocketStreambuf | _sockbuf |
| associated stream buffer. | |
socket stream class.
| using join::BasicSocketStream< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicSocketStream< Protocol >::Socket = typename Protocol::Socket |
| using join::BasicSocketStream< Protocol >::SocketStreambuf = BasicSocketStreambuf <Protocol> |
|
inline |
default constructor.
|
delete |
copy constructor.
| other | other object to copy. |
|
inline |
move constructor.
| other | other object to move. |
|
virtualdefault |
destroy the socket stream instance.
|
inlinevirtual |
assigns the specified endpoint to the socket.
| endpoint | endpoint to assign to the socket. |
| std::ios_base::failure. |
|
inlinevirtual |
close the connection.
| std::ios_base::failure. |
|
inlinevirtual |
make a connection to the given endpoint.
| endpoint | endpoint to connect to. |
| std::ios_base::failure. |
|
inline |
check if the socket is connected.
|
inlinevirtual |
shutdown the connection.
| std::ios_base::failure. |
|
inline |
check if the socket is secure.
|
inline |
determine the local endpoint associated with this socket.
|
inline |
check if the socket is opened.
|
inline |
move assignment operator.
| other | other object to assign. |
|
delete |
copy assignment operator.
| other | other object to assign. |
|
inline |
determine the remote endpoint associated with this socket.
|
inline |
get the nested socket.
|
inline |
get the current timeout in milliseconds.
|
inline |
set the socket timeout.
| ms | timeout in milliseconds. |
|
protected |
associated stream buffer.