wotpy.protocols.http.server

Class that implements the HTTP server.

Classes

HTTPServer([port, ssl_context, action_ttl_secs]) HTTP binding server implementation.
class wotpy.protocols.http.server.HTTPServer(port=80, ssl_context=None, action_ttl_secs=300)

Bases: wotpy.protocols.server.BaseProtocolServer

HTTP binding server implementation.

DEFAULT_PORT = 80
action_ttl

Returns the Action invocations Time-To-Live (seconds).

app

Tornado application.

build_base_url(hostname, thing)

Returns the base URL for the given Thing in the context of this server.

build_forms(hostname, interaction)

Builds and returns a list with all Form that are linked to this server for the given Interaction.

invocation_check_times

Dict that contains the timestamp of the last time an invocation was checked by a client..

is_secure

Returns True if this server is configured to use SSL encryption.

pending_actions

Dict of pending action invocations represented as Futures.

protocol

Protocol of this server instance. A member of the Protocols enum.

scheme

Returns the URL scheme for this server.

start()

Starts the HTTP server.

stop()

Stops the HTTP server.