:orphan: Flash Policy Transport ====================== Quick Links: :doc:`Transport Endpoints ` Old Web browsers like IE8 and IE9 do no support WebSocket natively. *One* option to work around is using `web-socket-js `__, a WebSocket implementation written in Adobe Flash. When using Adobe Flash to open a TCP socket, Flash will only allow the (outgoing) TCP connection *after* checking for a so called *Flash policy file* on the target server. And this policy file needs to be served on TCP port 843. Crossbar.io includes a *pseudo transport* for serving a Flash policy file. It is a *pseudo* transport, since in itself, it does not provide a WAMP transport, but its only purpose is to serve the Flash policy. The `Crossbar.io examples repository `__ contains a `working example `__ for this. Configuration ------------- In the configuration (``.crossbar/config.json``), you'll find: .. code:: json { "workers": [ { "type": "router", "transports": [ { "type": "flashpolicy", "allowed_domain": "*", "allowed_ports": [8080], "endpoint": { "type": "tcp", "port": 843 } } ] } ] } -------------- Usage ----- The only difference client side (in the HTML) versus a standard client is that you now include the Flash implementation *before* AutobahnJS: .. code:: html Configuration ------------- +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | option | description | +=================+======================================================================================================================================+ | id | ID of the transport within the running node (default: transport where N is numbered automatically starting from 1) | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | type | Type of transport - must be "flash". | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | endpoint | Listening endpoint for transport. See :doc:`Transport Endpoints` for configuration | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | allowed_domain | Domain (a string) clients should be allowed to connect to or null to allow any domain (default: null) | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | allowed_ports | List of ports (a list of integers from [1, 65535]) clients should be allowed to connect to or null to allow any port (default: null) | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+ | debug | Turn on debug logging for this transport instance (default: false). | +-----------------+--------------------------------------------------------------------------------------------------------------------------------------+