8 #include "wvlistener.h"
9 #include "wvistreamlist.h"
11 #include "wvmoniker.h"
22 IWvListener *l = wvcreate<IWvListener>(moniker, obj);
26 l->seterr_both(EINVAL,
"Unknown moniker '%s'", moniker);
32 WvListener::WvListener(
IWvStream *_cloned)
39 WvListener::~WvListener()
43 WvIStreamList::globallist.unlink(
this);
47 static IWvStream *wrapper_runner(IWvListenerWrapper wrapper,
62 wrapper = wv::bind(&wrapper_runner, _wrapper, _1);
68 void WvListener::callback()
89 IWvListenerCallback old = acceptor;
95 void WvListener::runonce(time_t msec_delay)
101 static WvStringAddr nulladdr(
"ERROR", WvEncap::Unknown);
102 const WvAddr *WvNullListener::src()
const
107 WvString WvListener::getattr(WvStringParm name)
const
110 if (ret.
isnull() && cloned)
111 return cloned->getattr(name);
#define UUID_MAP_ENTRY(iface)
Add an entry to an interface map.
A WvAddr that simply contains a printable string with a user-defined encapsulation type.
#define UUID_MAP_BEGIN(component)
Start the interface map for "component".
virtual IWvListenerCallback onaccept(IWvListenerCallback _cb)
Set a user-defined function to be called when a new connection is available.
WvString is an implementation of a simple and efficient printable-string class.
bool isnull() const
returns true if this string is null
Base class for different address types, each of which will have the ability to convert itself to/from...
virtual IWvStream * accept()=0
Accept a connection from this stream.
This is a listener that doesn't work.
#define UUID_MAP_END
Marks the end of an interface map.
virtual void addwrap(IWvListenerWrapper _wrapper)
Add a wrapper function for this stream: something that accept() will call to possibly wrap the stream...