WvStreams
wvunixlistener.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4  *
5  */
6 #ifndef __WVUNIXLISTENER_H
7 #define __WVUNIXLISTENER_H
8 
9 #include "wvlistener.h"
10 #include "wvaddr.h"
11 
12 #ifndef _WIN32
13 
15 class WvUnixListener : public WvListener
16 {
17 public:
18  WvUnixListener(const WvUnixAddr &_addr, int create_mode);
19  virtual ~WvUnixListener();
20  virtual void close();
21 
28  IWvStream *accept();
29 
31  virtual const WvUnixAddr *src() const;
32 
33 protected:
34  WvUnixAddr addr;
35  bool bound_okay;
36 
37  void accept_callback(WvIStreamList *list,
38  wv::function<void(IWvStream*)> cb,
39  IWvStream *_connection);
40 
41 public:
42  const char *wstype() const { return "WvUnixListener"; }
43 };
44 
45 #endif // _WIN32
46 
47 #endif // __WVUNIXLISTENER_H
WvListener
Definition: wvlistener.h:15
IWvStream
Definition: iwvstream.h:24
WvUnixListener
Server end of a Unix Sockets stream.
Definition: wvunixlistener.h:15
WvUnixListener::src
virtual const WvUnixAddr * src() const
src() is a bit of a misnomer, but it returns the socket address.
Definition: wvunixsocket.cc:244
WvIStreamList
WvStreamList holds a list of WvStream objects – and its select() and callback() functions know how to...
Definition: wvistreamlist.h:20
WvUnixAddr
A Unix domain socket address is really just a filename.
Definition: wvaddr.h:429
WvUnixListener::accept
IWvStream * accept()
return a new WvUnixConn socket corresponding to a newly-accepted connection.
Definition: wvunixsocket.cc:214