Part of bzrlib.smart.server View In Hierarchy
Known subclasses: bzrlib.tests.test_server.TestingSmartServer
Each connection will be served by a SmartServerSocketStreamMedium running in a thread.
hooks: An instance of SmartServerHooks.
Method | __init__ | Construct a new server. |
Method | start_server | Create the server listening socket. |
Method | run_server_started_hooks | Undocumented |
Method | run_server_stopped_hooks | Undocumented |
Method | serve | Undocumented |
Method | get_url | Return the url of the server |
Method | serve_conn | Undocumented |
Method | start_background_thread | Undocumented |
Method | stop_background_thread | Undocumented |
Method | _backing_urls | Undocumented |
Method | _stop_gracefully | Undocumented |
Method | _wait_for_clients_to_disconnect | Undocumented |
Method | _make_handler | Undocumented |
Method | _poll_active_connections | Check to see if any active connections have finished. |
To actually start it running, call either start_background_thread or serve.
Parameters | backing_transport | The transport to serve. |
root_client_path | The client path that will correspond to root of backing_transport. | |
client_timeout | See SmartServerSocketStreamMedium's timeout parameter. |
Parameters | host | Name of the interface to listen on. |
port | TCP port to listen on, or 0 to allocate a transient port. |
This will iterate through self._active_connections, and update any connections that are finished.
Parameters | timeout | The timeout to pass to thread.join(). By default, we set it to 0, so that we don't hang if threads are not done yet. |
Returns | None |