[Checkins] SVN: zc.monitor/trunk/src/zc/monitor/ - Added an ``address`` option to ``start`` to be able to specify an adapter to bind to
Adam Groszer
agroszer at gmail.com
Sun Jan 17 10:02:28 EST 2010
Log message for revision 108192:
- Added an ``address`` option to ``start`` to be able to specify an adapter to bind to
Changed:
U zc.monitor/trunk/src/zc/monitor/CHANGES.txt
U zc.monitor/trunk/src/zc/monitor/__init__.py
-=-
Modified: zc.monitor/trunk/src/zc/monitor/CHANGES.txt
===================================================================
--- zc.monitor/trunk/src/zc/monitor/CHANGES.txt 2010-01-17 13:45:52 UTC (rev 108191)
+++ zc.monitor/trunk/src/zc/monitor/CHANGES.txt 2010-01-17 15:02:28 UTC (rev 108192)
@@ -2,6 +2,12 @@
Change History
==============
+0.2.1 (unreleased)
+------------------
+
+- Added an ``address`` option to ``start`` to be able to specify an adapter
+ to bind to
+
0.2.0 (2009-10-28)
------------------
Modified: zc.monitor/trunk/src/zc/monitor/__init__.py
===================================================================
--- zc.monitor/trunk/src/zc/monitor/__init__.py 2010-01-17 13:45:52 UTC (rev 108191)
+++ zc.monitor/trunk/src/zc/monitor/__init__.py 2010-01-17 15:02:28 UTC (rev 108192)
@@ -70,15 +70,15 @@
pass # Don't care
-def start(port):
+def start(port, address=''):
"""start monitor server.
-
+
Returns True if monitor server started; returns False if the port is
already in use; and raises an exception otherwise.
"""
import zc.ngi.async
try:
- zc.ngi.async.listener(('', port), Server)
+ zc.ngi.async.listener((address, port), Server)
except socket.error, e:
if e.args[0] == errno.EADDRINUSE:
# Don't kill the process just because somebody else has our port.
@@ -95,11 +95,11 @@
def interactive(connection):
"""Turn on monitor's interactive mode
-
+
Normally, the monitor releases the connection after a single command.
By entering the interactive mode, the monitor will not end the connection
until you enter the "quit" command.
-
+
In interactive mode, an empty line repeats the last command.
"""
connection.write('Interactive mode on. Use "quit" To exit.\n')
@@ -107,7 +107,7 @@
def quit(connection):
"""Quit the monitor
-
+
This is only really useful in interactive mode (see the "interactive"
command).
"""
More information about the checkins
mailing list