sync
This commit is contained in:
10
examples/wamp/authentication/README.md
Normal file
10
examples/wamp/authentication/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
Authentication of WAMP Sessions
|
||||
===============================
|
||||
|
||||
WAMP Challenge-Response-Authentication ("WAMP-CRA") is a WAMP v1 protocol feature
|
||||
that provides in-band authentication of WAMP clients to servers.
|
||||
|
||||
It is based on HMAC-SHA256 and built into AutobahnPython, AutobahnJS and AutobahnAndroid.
|
||||
|
||||
This example shows how a AutobahnJS client can authenticate to a AutobahnPython based
|
||||
server. The server grants RPC and PubSub permissions based on authentication.
|
||||
@@ -5,7 +5,7 @@
|
||||
<title>WAMP Challenge Response Authentication</title>
|
||||
|
||||
<!-- include AutobahnJS .. that's all you need -->
|
||||
<script type="text/javascript" src="http://autobahn.ws/public/autobahn.min.js"></script>
|
||||
<script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script>
|
||||
|
||||
<!-- optionally, you can use AutobahnJS with jQuery Deferreds ..
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Serial2WebSocket Bridge using Autobahn and Arduino
|
||||
==================================================
|
||||
Bridging Arduino to AutobahnPython via Serial
|
||||
=============================================
|
||||
|
||||
This demo shows how to shuffle data between WebSocket clients and
|
||||
a device connected via a serial port.
|
||||
This demo shows how to shuffle data between WAMP clients and a device connected
|
||||
via a serial port like Arduino to a machine hosting the WAMP server.
|
||||
|
||||
We use an *Arduino* device connected to a notebook, and a browser
|
||||
running somewhere.
|
||||
@@ -90,31 +90,6 @@ for *WAMP*.
|
||||
|
||||
|
||||
|
||||
How to do it yourself
|
||||
---------------------
|
||||
|
||||
You will need AutobahnPython as server + PySerial for serial support in
|
||||
Python/Twisted.
|
||||
|
||||
Then, connect your serial device, run
|
||||
|
||||
python serial2ws.py
|
||||
|
||||
and open
|
||||
|
||||
http://localhost:8080/
|
||||
|
||||
in your browser.
|
||||
|
||||
Note: The serial2ws.py has a number of command line options for setting
|
||||
COM port, baudrate etc. Simply do a
|
||||
|
||||
python serial2ws.py --help
|
||||
|
||||
to get information on those.
|
||||
|
||||
|
||||
|
||||
How to do it yourself
|
||||
---------------------
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<head>
|
||||
<title>Autobahn Serial2Ws</title>
|
||||
|
||||
<script src="http://autobahn.ws/public/autobahn.min.js"></script>
|
||||
<script src="http://autobahn.s3.amazonaws.com/js/autobahn.min.js"></script>
|
||||
<script src="smoothie.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var sess = null;
|
||||
|
||||
33
examples/websocket/broadcast/README.md
Normal file
33
examples/websocket/broadcast/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
Broadcasting with WebSocket
|
||||
===========================
|
||||
|
||||
This example provides a WebSocket server that will broadcast any message it receives
|
||||
to all connected WebSocket clients. Additionally, it will broadcast a "tick" message
|
||||
to all connected clients every second.
|
||||
|
||||
Clients are provided for AutobahnJS and AutobahnPython.
|
||||
|
||||
There is also a companion [example](https://github.com/tavendo/AutobahnAndroid/tree/master/Demo/BroadcastClient) using AutobahnAndroid.
|
||||
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
Run the server by doing
|
||||
|
||||
python server.py
|
||||
|
||||
and open
|
||||
|
||||
http://localhost:8080/
|
||||
|
||||
in your browser.
|
||||
|
||||
To activate debug output on the server, start it
|
||||
|
||||
python server.py debug
|
||||
|
||||
To use the Python client, do
|
||||
|
||||
python client.py
|
||||
|
||||
26
examples/websocket/echo/README.md
Normal file
26
examples/websocket/echo/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
WebSocket Echo Server and Client
|
||||
================================
|
||||
|
||||
Running
|
||||
-------
|
||||
|
||||
Run the server by doing
|
||||
|
||||
python server.py
|
||||
|
||||
and open
|
||||
|
||||
http://localhost:8080/
|
||||
|
||||
in your browser.
|
||||
|
||||
To activate debug output on the server, start it
|
||||
|
||||
python server.py debug
|
||||
|
||||
This will show up all WAMP messages exchanged between clients and server.
|
||||
|
||||
To run the Python client, do
|
||||
|
||||
python client.py
|
||||
|
||||
5
examples/websocket/echo_tls/README.md
Normal file
5
examples/websocket/echo_tls/README.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Using TLS: secure WebSocket
|
||||
===========================
|
||||
|
||||
Example that shows how to do secure WebSocket (wss), on server and client for AutobahnPython,
|
||||
and with a browser client.
|
||||
7
examples/websocket/streaming/README.md
Normal file
7
examples/websocket/streaming/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
Using Frame-/Streaming-based APIs in AutobahnPython
|
||||
===================================================
|
||||
|
||||
The example here demonstrate how to use the (advanced) frame-based and streaming WebSocket APIs
|
||||
of AutobahnPython.
|
||||
|
||||
They also show off how to do advanced flow-control via the Twisted producer-consumer pattern.
|
||||
Reference in New Issue
Block a user