crossbar.router.longpoll

Classes

WampLongPollResource

A WAMP-over-Longpoll resource for use with Twisted Web Resource trees.

Module Contents

class WampLongPollResource(factory, serializers=None, timeout=10, killAfter=30, queueLimitBytes=128 * 1024, queueLimitMessages=100, debug_transport_id=None, reactor=None)[source]

Bases: twisted.web.resource.Resource

A WAMP-over-Longpoll resource for use with Twisted Web Resource trees.

This class provides an implementation of the WAMP-over-Longpoll transport for WAMP.

The Resource exposes the following paths (child resources).

Opening a new WAMP session:

  • <base-url>/open

Once a transport is created and the session is opened:

  • <base-url>/<transport-id>/send

  • <base-url>/<transport-id>/receive

  • <base-url>/<transport-id>/close

_debug_transport_id = None[source]
_factory[source]
_fail_request(request, msg)[source]

Fails a request to the long-poll service.

_get_notice(peer, redirect_url=None, redirect_after=0)[source]

Render a user notice (HTML page) when the Long-Poll root resource is accessed via HTTP/GET (by a user).

Parameters:
  • redirect_url (str) – Optional URL to redirect the user to.

  • redirect_after (int) – When redirect_url is provided, redirect after this time (seconds).

_killAfter = 30[source]
_queueLimitBytes = 131072[source]
_queueLimitMessages = 100[source]
_serializers[source]
_set_standard_headers(request)[source]

Set standard HTTP response headers.

_timeout = 10[source]
_transports[source]
getChild(name, request)[source]

Returns send/receive/close resource for transport.

See also

log[source]
protocol[source]
reactor = None[source]
render_GET(request)[source]