#include <unix_buffer.H>
Public Member Functions | |
virtual int | detach () |
unix_buffer (void) | |
create an unix_buffer that is ready to be connected to a socket descriptor | |
unix_buffer (const int _fd, const int secs_timeout=75) | |
unix_buffer (const connection_waiter &cw) | |
unix_buffer (const std::string &host, const int port) | |
virtual | ~unix_buffer () |
destroy the unix_buffer and close network connection (if any was open) | |
Protected Member Functions | |
virtual int | _get_descriptor () const |
virtual int | empty_buffer () |
virtual int | underflow () |
Definition at line 928 of file unix_buffer.H.
unix_buffer::unix_buffer | ( | void | ) | [inline] |
create an unix_buffer that is ready to be connected to a socket descriptor
Definition at line 1032 of file unix_buffer.H.
unix_buffer::unix_buffer | ( | const int | _fd, | |
const int | secs_timeout = 75 | |||
) | [inline, explicit] |
create an unix_buffer that is connected to the given socket descriptor
_fd | descriptor of an already opened connection | |
secs_timeout | (optional) timeout in seconds before read/write operations may fail |
autoclose
set to false
Definition at line 1046 of file unix_buffer.H.
unix_buffer::unix_buffer | ( | const connection_waiter & | cw | ) | [inline, explicit] |
create an unix_buffer that is connected to the given socket descriptor
cw | a connection_waiter object, that returns a descriptor of the next incoming client connection request |
Definition at line 1057 of file unix_buffer.H.
unix_buffer::unix_buffer | ( | const std::string & | host, | |
const int | port | |||
) | [inline] |
create an unix_buffer that connects to the given socket (and create a socket descriptor by itself)
host | string of symbolic/numerical internet address of host to connect | |
port | port number to connect |
Definition at line 1069 of file unix_buffer.H.
virtual unix_buffer::~unix_buffer | ( | ) | [inline, virtual] |
destroy the unix_buffer and close network connection (if any was open)
Definition at line 1214 of file unix_buffer.H.
virtual int unix_buffer::_get_descriptor | ( | ) | const [inline, protected, virtual] |
virtual int unix_buffer::empty_buffer | ( | ) | [inline, protected, virtual] |
Reimplemented from unix_fd_buffer.
Definition at line 933 of file unix_buffer.H.
References unix_fd_buffer::buffersize, cerr, count(), endl(), errno, my_strerror(), unix_fd_buffer::obuffer, and PTHREAD_TESTCANCEL.
virtual int unix_buffer::underflow | ( | ) | [inline, protected, virtual] |
Reimplemented from unix_fd_buffer.
Definition at line 976 of file unix_buffer.H.
References unix_fd_buffer::buffersize, count(), errno, unix_fd_buffer::ibuffer, my_strerror(), PTHREAD_TESTCANCEL, and unix_fd_buffer::pushbacksize.
virtual int unix_buffer::detach | ( | ) | [inline, virtual] |
detach the buffer from the socket descriptor
returnvalue
is not -1, it is most possibly open and should not be thrown away. Reimplemented from unix_fd_buffer.
Definition at line 1016 of file unix_buffer.H.