Dv::Net::usockstreambuf Class Reference

Dv::Util::fdstreambuf specialization for unix sockets. More...

#include <usockstreambuf.h>

Inheritance diagram for Dv::Net::usockstreambuf:
Inheritance graph
[legend]
Collaboration diagram for Dv::Net::usockstreambuf:
Collaboration graph
[legend]

List of all members.

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).

Detailed Description

Dv::Util::fdstreambuf specialization for unix sockets.

Definition at line 15 of file usockstreambuf.h.


Constructor & Destructor Documentation

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.

Parameters:
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
See also:
Dv::DebugSlave
Dv::Util::fdstreambuf::timedout(), Dv::Util::fdstreambuf
virtual Dv::Net::usockstreambuf::~usockstreambuf (  )  [virtual]

Destructor.


Member Function Documentation

static int Dv::Net::usockstreambuf::bind ( const std::string &  filename,
int &  err 
) [static]

Create socket fd and bind to filename, return <0 if error.

Parameters:
filename to which socket will be bound
err will receive error status, i.e. last system errno
Returns:
0 iff ok, -1 else. If -1 is returned, err will be set to the last system errno.
const std::string& Dv::Net::usockstreambuf::filename (  )  const [inline]
Returns:
filename of this unix socket.

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.

Parameters:
fn filename to associate with this socket.

Definition at line 48 of file usockstreambuf.h.

References fn_.


Friends And Related Function Documentation

friend class usocket [friend]

Usocket is friend to allow access to Dv::Util::fdstreambuf::error(int).

Definition at line 17 of file usockstreambuf.h.


Member Data Documentation

std::string Dv::Net::usockstreambuf::fn_ [private]

Filename associated with this unix socket.

Definition at line 50 of file usockstreambuf.h.

Referenced by filename().


The documentation for this class was generated from the following file:

dvnet-0.9.24 [ 5 December, 2009]