Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:wamp:docs [2015/08/12 10:46] – [http publisher] scipio | projects:wamp:docs [2017/05/04 17:45] (current) – [http bridge publisher and callew] scipio | ||
---|---|---|---|
Line 28: | Line 28: | ||
< | < | ||
pip install crossbar[tls, | pip install crossbar[tls, | ||
+ | pip install setproctitle | ||
+ | </ | ||
+ | |||
+ | ATTENZIONE con la versione 0.11.1, | ||
+ | commentare la riga 232 di lib/ | ||
+ | < | ||
+ | # | ||
</ | </ | ||
Line 104: | Line 111: | ||
</ | </ | ||
- | ==== http publisher === | + | supervisor config |
+ | < | ||
+ | [program: | ||
+ | command=/ | ||
+ | user=wamp | ||
+ | autostart=true | ||
+ | </ | ||
+ | |||
+ | ==== http bridge | ||
- | A post request can emit WAMP **event** | + | An http POST request can emit WAMP event, or we can call an RPC via http POST. |
< | < | ||
Line 120: | Line 135: | ||
" | " | ||
" | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | " | ||
+ | " | ||
" | " | ||
" | " | ||
} | } | ||
+ | |||
} | } | ||
} | } | ||
Line 128: | Line 149: | ||
</ | </ | ||
- | example of post | + | example of event publish |
< | < | ||
import requests | import requests | ||
- | requests.post(" | + | requests.post(" |
json={ | json={ | ||
' | ' | ||
Line 139: | Line 160: | ||
</ | </ | ||
- | example of post with curl | + | example of event post with curl |
< | < | ||
curl --connect-timeout 3 \ | curl --connect-timeout 3 \ | ||
Line 148: | Line 169: | ||
+ | |||
+ | example of RPC call with curl | ||
+ | < | ||
+ | curl --connect-timeout 3 \ | ||
+ | -H " | ||
+ | -d ' | ||
+ | | ||
+ | |||
+ | </ | ||
==== WSGI app (pyramid) ==== | ==== WSGI app (pyramid) ==== | ||