3. Nailed-Up Server Support

The pushy.server module provides functions for servicing requests on a Pushy connection. It provides some internal functions (not documented here, due to their being internal) for servicing requests on a connection, and also, discussed below, the function pushy.server.run() for starting a nailed-up server for listening for connections.

pushy.server.run([port])

Create a TCP/IP socket, and service the incoming connections. This is to be used in conjunction with the pushy.transport.daemon module, for situations where a long-lived server process is required.

Parameters:port (Integer, or the string constant “stdio”.) – The port on which to listen for connections. If omitted, the port will be DEFAULT_PORT. If the string “stdio” is specified, then the server will instead service a connection over standard I/O.
pushy.server.DEFAULT_PORT

The default port on which the Pushy server will listen for incoming connections: 10101.

3.1. Starting a Server From the Command Line

As an alternative to to the pushy.server.run() function, it is possible to start a Pushy server from the command line, like so:

$ hostname
fork
$ python -m pushy.server

Table Of Contents

Previous topic

2. Builtin Transport Modules

This Page