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


Public Types | |
| using | Endpoint = typename Protocol::Endpoint |
| using | Socket = typename Protocol::Socket |
Public Member Functions | |
| BasicSocketStreambuf () | |
| default constructor. | |
| BasicSocketStreambuf (const BasicSocketStreambuf &other)=delete | |
| copy constructor. | |
| BasicSocketStreambuf & | operator= (const BasicSocketStreambuf &other)=delete |
| copy assignment operator. | |
| BasicSocketStreambuf (BasicSocketStreambuf &&other) | |
| move constructor. | |
| BasicSocketStreambuf & | operator= (BasicSocketStreambuf &&other) |
| move assignment operator. | |
| virtual | ~BasicSocketStreambuf () |
| destroy the socket stream buffer instance. | |
| BasicSocketStreambuf * | bind (const Endpoint &endpoint) |
| assigns the specified endpoint to the socket. | |
| BasicSocketStreambuf * | connect (const Endpoint &endpoint) |
| make a connection to the given endpoint. | |
| BasicSocketStreambuf * | disconnect () |
| shutdown the connection. | |
| void | close () |
| close the connection. | |
| void | timeout (int ms) |
| set the socket timeout. | |
| int | timeout () const |
| get the current timeout in milliseconds. | |
| Socket & | socket () |
| get the nested socket. | |
Protected Member Functions | |
| virtual int_type | underflow () override |
| reads characters from the associated input sequence to the get area. | |
| virtual int_type | overflow (int_type c=traits_type::eof()) override |
| writes characters to the associated output sequence from the put area. | |
| virtual int_type | sync () override |
| synchronizes the buffers with the associated character sequence. | |
Protected Attributes | |
| std::unique_ptr< char[]> | _buf |
| internal buffer. | |
| int | _timeout = 30000 |
| timeout. | |
| Socket | _socket |
| internal socket. | |
Static Protected Attributes | |
| static const std::streamsize | _bufsize = 4096 |
| internal buffer size. | |
socket stream buffer class.
| using join::BasicSocketStreambuf< Protocol >::Endpoint = typename Protocol::Endpoint |
| using join::BasicSocketStreambuf< Protocol >::Socket = typename Protocol::Socket |
|
inline |
default constructor.
|
delete |
copy constructor.
| other | other object to copy. |
|
inline |
move constructor.
| other | other object to move. |
|
inlinevirtual |
destroy the socket stream buffer instance.
|
inline |
assigns the specified endpoint to the socket.
| endpoint | endpoint to assign to the socket. |
|
inline |
close the connection.
|
inline |
make a connection to the given endpoint.
| endpoint | endpoint to connect to. |
|
inline |
shutdown the connection.
|
inline |
move assignment operator.
| other | other object to assign. |
|
delete |
copy assignment operator.
| other | other object to assign. |
|
inlineoverrideprotectedvirtual |
writes characters to the associated output sequence from the put area.
| c | the character to store in the put area. |
|
inline |
get the nested socket.
|
inlineoverrideprotectedvirtual |
synchronizes the buffers with the associated character sequence.
|
inline |
get the current timeout in milliseconds.
|
inline |
set the socket timeout.
| ms | timeout in milliseconds. |
|
inlineoverrideprotectedvirtual |
reads characters from the associated input sequence to the get area.
|
protected |
internal buffer.
|
staticprotected |
internal buffer size.
|
protected |
internal socket.
|
protected |
timeout.