Package commons :: Module servers :: Class StreamServer
[hide private]
[frames] | no frames]

Class StreamServer

source code

                 object --+    
                          |    
       StoppableServerMixin --+
                              |
SocketServer.BaseServer --+   |
                          |   |
     SocketServer.TCPServer --+
                              |
                             StreamServer
Known Subclasses:

Base class for stoppable TCP stream servers.

This class supports interrupts because it times out the blocking call to select.select, and checks whether the program is terminating.

Instance Methods [hide private]
 
__init__(self, host, port, handler, timeout, do_catch)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code

Inherited from StoppableServerMixin: handle_stop, serve_forever, stop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from SocketServer.TCPServer: close_request, fileno, get_request, server_activate, server_bind, server_close

Inherited from SocketServer.BaseServer: finish_request, handle_error, handle_request, handle_timeout, process_request, shutdown, verify_request

Inherited from SocketServer.BaseServer (private): _handle_request_noblock

Class Methods [hide private]

Inherited from StoppableServerMixin: stop_all

Class Variables [hide private]
  allow_reuse_address = True

Inherited from StoppableServerMixin: servers, stop_event

Inherited from SocketServer.TCPServer: address_family, request_queue_size, socket_type

Inherited from SocketServer.BaseServer: timeout

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host, port, handler, timeout, do_catch)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • timeout - The amount of time to spend in select.select.
  • do_catch - Whether exceptions should be swallowed in the loop.
Overrides: SocketServer.BaseServer.__init__
(inherited documentation)