ginsfsm.router

GRouter GObj

class ginsfsm.router.GRouter[source]

GRouter GObj. Exchange events between GAplic’s of same or different hosts. This gobj is permanent and direct child of his GAplic.

The GRouter have two options:

  • open an own listening port,
  • use a url in a http server environment.

The first option only works with a pure websocket channel. The second option needs an application done with Pyramid framework and implements sockjs-protocol.

Configurable Parameters:
Name Type Default value Description
update_unknown_roles bool False update unknown roles
localhost_route_ports tuple [2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699] List of posible listening ports acting as localhost tcp router server
timeout_idle int 5 idle timeout
pyramid_root None None pyramid root (parent)
pyramid_router_url str __pyramid_router__ pyramid url to start the router
limit_pending_output int 2 output queue size
trace_router bool False trace route messages
static_routes tuple None static routes with format:name, role1+role2, url1+url2; name2, role2, url2; …
server bool False Server router. Any gaplic with public services must be server
Diagram:
Input-Events:
  • 'EV_TIMEOUT': Timer over.
    Start the machine.
  • 'EV_CONNECTED': New client.
  • 'EV_DISCONNECTED': Client disconnected.

Output-Events:

start_up()[source]

Initialization zone.