IBR-DTNSuite
0.12
|
#include <socketstream.h>
Public Member Functions | |
socketstream (clientsocket *sock, size_t buffer_size=5120) | |
virtual | ~socketstream () |
void | setTimeout (const timeval &val) |
void | close () |
Public Attributes | |
socket_error_code | errmsg |
Protected Member Functions | |
virtual int | sync () |
virtual std::char_traits< char > ::int_type | overflow (std::char_traits< char >::int_type=std::char_traits< char >::eof()) |
virtual std::char_traits< char > ::int_type | underflow () |
Definition at line 40 of file socketstream.h.
ibrcommon::socketstream::socketstream | ( | clientsocket * | sock, |
size_t | buffer_size = 5120 |
||
) |
Definition at line 28 of file socketstream.cpp.
References ibrcommon::vsocket::add(), and ibrcommon::vsocket::up().
|
virtual |
Definition at line 42 of file socketstream.cpp.
References ibrcommon::vsocket::destroy().
void ibrcommon::socketstream::close | ( | ) |
Definition at line 47 of file socketstream.cpp.
References ibrcommon::vsocket::down().
Referenced by dtn::api::OrderedStreamHandler::__cancellation(), dtn::api::BinaryStreamClient::__cancellation(), dtn::api::ExtendedApiHandler::__cancellation(), dtn::net::TCPConnection::__cancellation(), dtn::api::ApiServer::componentRun(), dtn::api::OrderedStreamHandler::finally(), dtn::api::BinaryStreamClient::finally(), dtn::api::ExtendedApiHandler::finally(), dtn::net::TCPConnection::finally(), main(), overflow(), term(), underflow(), and dtn::api::Client::~Client().
|
protectedvirtual |
Definition at line 67 of file socketstream.cpp.
References close(), ibrcommon::socket_error::code(), errmsg, ibrcommon::ERROR_AGAIN, ibrcommon::ERROR_CLOSED, ibrcommon::ERROR_WRITE, IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, ibrcommon::vsocket::select(), ibrcommon::clientsocket::send(), and ibrcommon::Exception::what().
Referenced by sync().
void ibrcommon::socketstream::setTimeout | ( | const timeval & | val) |
Definition at line 53 of file socketstream.cpp.
|
protectedvirtual |
Definition at line 58 of file socketstream.cpp.
References overflow().
|
protectedvirtual |
Definition at line 156 of file socketstream.cpp.
References close(), ibrcommon::socket_error::code(), errmsg, ibrcommon::ERROR_CLOSED, IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, ibrcommon::clientsocket::recv(), ibrcommon::vsocket::select(), and ibrcommon::Exception::what().
socket_error_code ibrcommon::socketstream::errmsg |
Definition at line 49 of file socketstream.h.
Referenced by overflow(), and underflow().