server module

Sputnik HTTPServer Implementation

This module provides the Sputnik HTTPServer implementation. It is responsible for serving the web interface, and interfaces with the Bouncer singleton to connect to and disconnect from networks.

class server.HTTPServer(bouncer)[source]

Bases: tornado.web.Application

An Asynchronous HTTP Server that diplays the frontend.

The HTTPServer renders the frontend and accepts commands used to control the Bouncer singleton. For development purposes, it may be helpful to set the DEBUG environment variable. e.g. export DEBUG=True

start(port=8080)[source]

Starts the HTTP listen server.

This loads the Tornado HTTPServer on the specified port.

Parameters:port (int, optional) – The port to listen on. Defaults to 8080