Dv::Util::fdstreambuf specialization for unix sockets. More...
#include <usockstreambuf.h>
Public Member Functions | |
usockstreambuf (size_t in_buf_size=1024, size_t out_buf_size=1024, time_t delay=0, unsigned int min_debug_level=0, Debugable *debug_master=0) | |
Constructor. | |
virtual | ~usockstreambuf () |
Destructor. | |
const std::string & | filename () const |
Static Public Member Functions | |
static int | bind (const std::string &filename, int &err) |
Create socket fd and bind to filename, return <0 if error. | |
Private Member Functions | |
void | filename (const std::string &fn) |
Set filename associated with this unix socket. | |
Private Attributes | |
std::string | fn_ |
Filename associated with this unix socket. | |
Friends | |
class | usocket |
Usocket is friend to allow access to Dv::Util::fdstreambuf::error(int). |
Dv::Util::fdstreambuf specialization for unix sockets.
Definition at line 15 of file usockstreambuf.h.
Dv::Net::usockstreambuf::usockstreambuf | ( | size_t | in_buf_size = 1024 , |
|
size_t | out_buf_size = 1024 , |
|||
time_t | delay = 0 , |
|||
unsigned int | min_debug_level = 0 , |
|||
Debugable * | debug_master = 0 | |||
) | [explicit] |
Constructor.
in_buf_size | size (in bytes) of input buffer. | |
out_buf_size | size (in bytes) of output buffer. | |
delay | (in milliseconds) if an I/O operation does not complete in delay milliseconds, it will time out. | |
min_debug_level | if a debug_master is connected, logging info will only be written if the master's level is at least min_debug_level | |
debug_master | from where debug info will be taken |
virtual Dv::Net::usockstreambuf::~usockstreambuf | ( | ) | [virtual] |
Destructor.
static int Dv::Net::usockstreambuf::bind | ( | const std::string & | filename, | |
int & | err | |||
) | [static] |
Create socket fd and bind to filename, return <0 if error.
filename | to which socket will be bound | |
err | will receive error status, i.e. last system errno |
const std::string& Dv::Net::usockstreambuf::filename | ( | ) | const [inline] |
Definition at line 43 of file usockstreambuf.h.
References fn_.
void Dv::Net::usockstreambuf::filename | ( | const std::string & | fn | ) | [inline, private] |
Set filename associated with this unix socket.
fn | filename to associate with this socket. |
Definition at line 48 of file usockstreambuf.h.
References fn_.
friend class usocket [friend] |
Usocket is friend to allow access to Dv::Util::fdstreambuf::error(int).
Definition at line 17 of file usockstreambuf.h.
std::string Dv::Net::usockstreambuf::fn_ [private] |
Filename associated with this unix socket.
Definition at line 50 of file usockstreambuf.h.
Referenced by filename().
dvnet-0.9.24 | [ 5 December, 2009] |