Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

WvUnixConn Class Reference

#include <wvunixsocket.h>

Inheritance diagram for WvUnixConn:

WvStream WvStream List of all members.

Public Methods

 WvUnixConn (const WvUnixAddr &_addr)
virtual ~WvUnixConn ()
const WvUnixAddrlocaladdr ()
virtual const WvUnixAddrsrc () const
 WvUnixConn (const WvUnixAddr &_addr)
virtual ~WvUnixConn ()
const WvUnixAddrlocaladdr ()
virtual const WvUnixAddrsrc () const

Protected Methods

 WvUnixConn (int _fd, const WvUnixAddr &_addr)
 WvUnixConn (int _fd, const WvUnixAddr &_addr)

Protected Attributes

WvUnixAddr addr

Friends

class WvUnixListener

Detailed Description

WvStream-based Unix domain socket connection class.

Unlike WvTCPConn, WvUnixConn makes connections synchronously because either the remote server is there, or it isn't. For convenience, we'll just ignore situations where it's a local server but still slow.

FIXME: support SOCK_DGRAM mode somehow. This is a bit tricky since the listener/connection separation doesn't make as much sense then. I guess we could just ignore the listener or something...

FIXME: use the weird credential-passing stuff to exchange pid, uid, and gid with the remote end of the socket. See the unix(7) man page. This would be very cool for authentication purposes.

Definition at line 29 of file include/wvunixsocket.h.


Constructor & Destructor Documentation

WvUnixConn::WvUnixConn int    _fd,
const WvUnixAddr   _addr
[protected]
 

connect an already-open socket (used by WvUnixListener)

Definition at line 25 of file wvunixsocket.cc.

WvUnixConn::WvUnixConn const WvUnixAddr   _addr
 

connect a new socket

Definition at line 32 of file wvunixsocket.cc.

References addr, WvStream::getfd, WvStream::rwfd, WvStream::seterr, WvUnixAddr::sockaddr, and WvUnixAddr::sockaddr_len.

WvUnixConn::~WvUnixConn   [virtual]
 

Definition at line 61 of file wvunixsocket.cc.

References WvStream::close.

WvUnixConn::WvUnixConn int    _fd,
const WvUnixAddr   _addr
[protected]
 

connect an already-open socket (used by WvUnixListener)

WvUnixConn::WvUnixConn const WvUnixAddr   _addr
 

connect a new socket

virtual WvUnixConn::~WvUnixConn   [virtual]
 


Member Function Documentation

const WvUnixAddr& WvUnixConn::localaddr   [inline]
 

the local address of this socket (ie. from getsockname()) really useful only for transparent proxies, but always available. may be 0.0.0.0 if we did not bind explicitly!

Definition at line 53 of file ipstreams/wvunixsocket.h.

const WvUnixAddr& WvUnixConn::localaddr   [inline]
 

the local address of this socket (ie. from getsockname()) really useful only for transparent proxies, but always available. may be 0.0.0.0 if we did not bind explicitly!

Definition at line 53 of file include/wvunixsocket.h.

virtual const WvUnixAddr* WvUnixConn::src   const [virtual]
 

return the remote address (source of all incoming packets), which is a constant for any given connection. This doesn't make much sense in Unix domain sockets, so we just return localaddr() instead.

Reimplemented from WvStream.

const WvUnixAddr * WvUnixConn::src   const [virtual]
 

return the remote address (source of all incoming packets), which is a constant for any given connection. This doesn't make much sense in Unix domain sockets, so we just return localaddr() instead.

Reimplemented from WvStream.

Definition at line 71 of file wvunixsocket.cc.

References addr.


Friends And Related Function Documentation

WvUnixListener [friend]
 

Definition at line 31 of file include/wvunixsocket.h.


Member Data Documentation

WvUnixAddr WvUnixConn::addr [protected]
 

Definition at line 33 of file ipstreams/wvunixsocket.h.

Referenced by src, and WvUnixConn.


The documentation for this class was generated from the following files:
Generated on Sun Aug 25 02:29:48 2002 for WvStreams by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002