wotpy.protocols.coap.server

Class that implements the CoAP server.

Classes

CoAPServer([port, ssl_context, ...])

CoAP binding server implementation.

class wotpy.protocols.coap.server.CoAPServer(port=5683, ssl_context=None, oscore_credentials_map=None, action_clear_ms=None, security_scheme={'scheme': 'nosec'})

Bases: BaseProtocolServer

CoAP binding server implementation.

DEFAULT_PORT = 5683
DEFAULT_SECURITY_SCHEME = {'scheme': 'nosec'}
property action_clear_ms

Returns the timeout (ms) before completed actions are removed from the server.

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.

property is_secure

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

property protocol

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

property scheme

Returns the URL scheme for this server.

async start(servient=None)

Starts the CoAP server.

async stop()

Stops the CoAP server.