38
38
hooks: An instance of SmartServerHooks.
41
def __init__(self, backing_transport, host='127.0.0.1', port=0):
41
def __init__(self, backing_transport, host='127.0.0.1', port=0,
42
43
"""Construct a new server.
44
45
To actually start it running, call either start_background_thread or
47
49
:param host: Name of the interface to listen on.
48
50
:param port: TCP port to listen on, or 0 to allocate a transient port.
50
54
# let connections timeout so that we get a chance to terminate
51
55
# Keep a reference to the exceptions we want to catch because the socket