Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

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)
 Constructor.
virtual ~usockstreambuf ()
 Destructor.
const std::string & filename () const

Static Public Member Functions

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.

Detailed Description

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

Definition at line 17 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
[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.
See also:
Dv::Util::fdstreambuf::timedout(), Dv::Util::fdstreambuf

virtual Dv::Net::usockstreambuf::~usockstreambuf  )  [virtual]
 

Destructor.


Member Function Documentation

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 53 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 60 of file usockstreambuf.h.

References fn_.


Member Data Documentation

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

Filename associated with this unix socket.

Definition at line 64 of file usockstreambuf.h.

Referenced by filename().


The documentation for this class was generated from the following file:
dvnet-0.9.11 [27 December, 2004]