| |
- SocketListener
- StdinListener
class SocketListener |
|
SocketListener: Listen for events on an Internet or Unix domain socket.
This opens a socket; external processes can connect and send Boodler
events to it. You can open either Internet sockets (with a numeric
port number), or Unix domain sockets. (Unix sockets exist as a "file"
on disk; only processes on the same machine can connect to a Unix
socket.)
SocketListener(handler, listenport=31863) -- constructor
The socket is opened as soon as the SocketListener is constructed.
If listenport is an integer, this will be an Internet socket. If
listenport is a string, it will be a Unix domain socket.
Events will be sent to the handler function.
Public methods:
poll() -- read as many events as are available
close() -- close the socket |
|
Methods defined here:
- __init__(self, handler, listenport=None)
- close(self)
- poll(self)
Data and other attributes defined here:
- unlinkport = None
|
class StdinListener |
|
StdinListener: Listen for events arriving on standard input.
This is intended for when Boodler is running as a subordinate process
in some other program. The hosting program can write event data in
to Boodler.
NOTE: This does not currently work on Windows, because the fcntl
module is not available.
StdinListener(handler) -- constructor
Events will be sent to the handler function.
Public methods:
poll() -- read as many events as are available
close() -- close the socket |
|
Methods defined here:
- __init__(self, handler)
- close(self)
- poll(self)
| |