ginsfsm.protocols.sockjs.server

This code is highly inspired in the great jobs:

Mainly in sockjs-tornado because it has an asynchronous model like gobj-ecosistema. But pyramid-sockjs has been very helpful to learn tricks of Pyramid and Webob.

Very grateful to both projects.

Sockjs protocol.

Sockjs server for ginsfsm and Pyramid.

Classes involved:

../../_images/sockjs-server.png

GSockjsServer GObj

class ginsfsm.protocols.sockjs.server.c_sockjs_server.GSockjsServer[source]

GSockjsServer GObj. This gobj only works with Pyramid framework.

Configurable Parameters:
Name Type Default value Description
per_user bool False TODO: default is True in pyramid_sockjs
sockjs_url str http://cdn.sockjs.org/sockjs-0.3.min.js SockJS location
jsessionid bool True Enable or disable JSESSIONID cookie handling
response_limit int 131072 Max response body size
verify_ip bool True Enable IP checks for polling transports. If enabled, all subsequent polling calls should be from the same IP address.
sockjs_app_class None None Class to receive sockjs events.GSockjsServer will create a instance of this class.
immediate_flush bool True Should sockjs-tornado flush messages immediately or queue then and flush on next ioloop tick
subscriber None None subcriber of all output-events.Default is None, i.e., the parent
disabled_transports tuple () Transports disabled
session_check_interval int 5 Sessions check interval in seconds
disconnect_delay int 10 Session expiration in seconds
heartbeat_delay int 25 Heartbeat time in seconds. Do not change this value unless you absolutely sure that new value will work.
Diagram:
Input-Events:
  • 'EV_INPUT_EVENT': sample input event.

    Event attributes:

    • data: sample event attribute.
Output-Events:
  • 'EV_OUTPUT_EVENT': sample output event.

    Event attributes:

    • data: sample event attribute.
start_up()[source]

Initialization zone.