#include <wvunixsocket.h>
Inheritance diagram for WvUnixListener:
Public Member Functions | |
WvUnixListener (const WvUnixAddr &_addr, int create_mode) | |
virtual | ~WvUnixListener () |
virtual void | close () |
WvUnixConn * | accept () |
void | auto_accept (WvStreamList *list, WvStreamCallback callfunc=NULL, void *userdata=NULL) |
virtual size_t | uread (void *buf, size_t len) |
virtual size_t | uwrite (const void *buf, size_t len) |
virtual const WvUnixAddr * | src () const |
WvUnixListener (const WvUnixAddr &_addr, int create_mode) | |
virtual | ~WvUnixListener () |
virtual void | close () |
WvUnixConn * | accept () |
void | auto_accept (WvStreamList *list, WvStreamCallback callfunc=NULL, void *userdata=NULL) |
virtual size_t | uread (void *buf, size_t len) |
virtual size_t | uwrite (const void *buf, size_t len) |
virtual const WvUnixAddr * | src () const |
Static Protected Member Functions | |
void | accept_callback (WvStream &s, void *userdata) |
void | accept_callback (WvStream &s, void *userdata) |
Protected Attributes | |
WvUnixAddr | addr |
bool | bound_okay |
WvStreamList * | auto_list |
WvStreamCallback | auto_callback |
void * | auto_userdata |
WvStreamList * | auto_list |
void * | auto_userdata |
Definition at line 67 of file include/wvunixsocket.h.
|
Definition at line 77 of file wvunixsocket.cc. References addr, auto_list, auto_userdata, bound_okay, WvStream::getfd(), WvStream::rwfd, WvStream::seterr(), WvUnixAddr::sockaddr(), and WvUnixAddr::sockaddr_len(). |
|
Definition at line 111 of file wvunixsocket.cc. References close(). |
|
|
|
|
|
return a new WvUnixConn socket corresponding to a newly-accepted connection. If no connection is ready immediately, we wait for one indefinitely. You can use select(read=true) to check for a waiting connection. |
|
return a new WvUnixConn socket corresponding to a newly-accepted connection. If no connection is ready immediately, we wait for one indefinitely. You can use select(read=true) to check for a waiting connection. Definition at line 132 of file wvunixsocket.cc. References WvStream::getfd(). Referenced by accept_callback(). |
|
|
|
Definition at line 155 of file wvunixsocket.cc. References accept(), WvList< WvStream >::append(), auto_callback, auto_list, auto_userdata, and WvStream::setcallback(). |
|
set a callback() function that automatically accepts new WvUnixConn connections, assigning them their own callback function 'callfunc' with parameter 'userdata.' Pass list==NULL or define your own own callback function to disable auto-accepting. Be careful not to accept() connections yourself if you do this, or we may end up accept()ing twice, causing a hang the second time. |
|
set a callback() function that automatically accepts new WvUnixConn connections, assigning them their own callback function 'callfunc' with parameter 'userdata.' Pass list==NULL or define your own own callback function to disable auto-accepting. Be careful not to accept() connections yourself if you do this, or we may end up accept()ing twice, causing a hang the second time. Definition at line 145 of file wvunixsocket.cc. References auto_callback, auto_list, auto_userdata, and WvStream::setcallback(). |
|
Close the stream if it is open; isok() becomes false from now on. Note!! If you override this function in a derived class, you must call it yourself from your destructor. WvStream::~WvStream() can only call WvStream::close() because of the way virtual functions work in C++. Reimplemented from WvStream. |
|
Close the stream if it is open; isok() becomes false from now on. Note!! If you override this function in a derived class, you must call it yourself from your destructor. WvStream::~WvStream() can only call WvStream::close() because of the way virtual functions work in C++. Reimplemented from WvStream. Definition at line 117 of file wvunixsocket.cc. References WvStream::close(). Referenced by ~WvUnixListener(). |
|
src() is a bit of a misnomer, but it returns the socket address. Reimplemented from WvStream. |
|
src() is a bit of a misnomer, but it returns the socket address. Reimplemented from WvStream. Definition at line 177 of file wvunixsocket.cc. References addr. |
|
these don't do anything, but they confuse the socket, so we'll ignore them on purpose. Reimplemented from WvStream. |
|
these don't do anything, but they confuse the socket, so we'll ignore them on purpose. Reimplemented from WvStream. Definition at line 165 of file wvunixsocket.cc. |
|
unbuffered I/O functions; these ignore the buffer, which is handled by write(). Don't call these functions unless you have a _really_ good reason. Reimplemented from WvStream. |
|
unbuffered I/O functions; these ignore the buffer, which is handled by write(). Don't call these functions unless you have a _really_ good reason. Reimplemented from WvStream. Definition at line 171 of file wvunixsocket.cc. |
|
Definition at line 108 of file ipstreams/wvunixsocket.h. Referenced by src(), and WvUnixListener(). |
|
Definition at line 112 of file ipstreams/wvunixsocket.h. Referenced by accept_callback(), and auto_accept(). |
|
Definition at line 110 of file ipstreams/wvunixsocket.h. |
|
Definition at line 110 of file include/wvunixsocket.h. Referenced by accept_callback(), auto_accept(), and WvUnixListener(). |
|
Definition at line 113 of file ipstreams/wvunixsocket.h. |
|
Definition at line 113 of file include/wvunixsocket.h. Referenced by accept_callback(), auto_accept(), and WvUnixListener(). |
|
Definition at line 109 of file ipstreams/wvunixsocket.h. Referenced by WvUnixListener(). |