A stream buffer class that handles stream sockets.
More...
#include <skstream.h>
|
| stream_socketbuf (SOCKET_TYPE sock, std::streamsize insize=0x8000, std::streamsize outsize=0x8000) |
|
| stream_socketbuf (SOCKET_TYPE sock, std::streambuf::char_type *buf, std::streamsize length) |
|
virtual | ~stream_socketbuf () |
| Destroy the socket buffer.
|
|
| socketbuf (SOCKET_TYPE sock, std::streamsize insize=0x8000, std::streamsize outsize=0x8000) |
|
| socketbuf (SOCKET_TYPE sock, std::streambuf::char_type *buf, std::streamsize length) |
|
virtual | ~socketbuf () |
| Destroy the socket buffer.
|
|
void | setSocket (SOCKET_TYPE sock) |
| Set the existing socket that this buffer should use.
|
|
SOCKET_TYPE | getSocket () const |
| Get the socket that this buffer uses.
|
|
void | setReadTimeout (unsigned sec, unsigned usec=0) |
|
void | setWriteTimeout (unsigned sec, unsigned usec=0) |
|
void | setTimeout (unsigned sec, unsigned usec=0) |
|
bool | timeout () const |
| Return the flag indicating whether a timeout has occured.
|
|
|
virtual int_type | overflow (int_type nCh=traits_type::eof()) |
| Handle writing data from the buffer to the socket.
|
|
virtual int_type | underflow () |
| Handle reading data from the socket to the buffer.
|
|
virtual int | sync () |
| Flush the output buffer.
|
|
std::streambuf * | setbuf (std::streambuf::char_type *buf, std::streamsize len) |
|
|
SOCKET_TYPE | _socket |
|
timeval | _underflow_timeout |
|
timeval | _overflow_timeout |
|
bool | Timeout |
|
A stream buffer class that handles stream sockets.
stream_socketbuf::stream_socketbuf |
( |
SOCKET_TYPE |
sock, |
|
|
std::streamsize |
insize = 0x8000 , |
|
|
std::streamsize |
outsize = 0x8000 |
|
) |
| |
|
explicit |
Make a new socket buffer from an existing socket, with optional buffer sizes.
stream_socketbuf::stream_socketbuf |
( |
SOCKET_TYPE |
sock, |
|
|
std::streambuf::char_type * |
buf, |
|
|
std::streamsize |
length |
|
) |
| |
Make a new socket buffer from an existing socket, with an existing buffer.
The documentation for this class was generated from the following files: