smoke-signals

Created: 2014-05-19 16:37
Updated: 2017-06-13 15:54
License: mpl-2.0

README.md

Smoke Signals

This is a simple WebRTC signaling server.

Usage

Infos:

$ curl -X GET http://localhost:7665/
{
  "name": "smoke-signals",
  "description": "A simple WebRTC signaling server",
  "version":"0.0.1",
  "endpoint":"http://localhost:7665"
}

Create a room:

$ curl -X POST http://localhost:7665/rooms --header "Content-Type: application/json"
{"room": "3d56a9d9b2b8709fa5874d2907542e4a"}

$ curl -X POST http://localhost:7665/rooms --header "Content-Type: application/json" --data '{"room": "foo"}'
{"room": "foo"}

Listen for events in a room:

$ curl -X GET http://localhost:7665/rooms/3d56a9d9b2b8709fa5874d2907542e4a

event: uid
data: {"uid": "3d56a9d9b2b8709fa5874d2907542e4a", "token": "0ca598dd0627a091342705f05d38124d"}

event: newbuddy
data: {"peer": "3d56a9d9b2b8709fa5874d2907542e4a"}

Send an event to someone (here it sends an event bar to user xoo:

$ curl -X POST http://localhost:7665/rooms/3d56a9d9b2b8709fa5874d2907542e4a --header "Content-Type: application/json" " --data '
{
  "type": "bar",
  "token": "my token",
  "peer": "xoo",
  "payload": {
    "arbitrary": "data"
  }
}'

License

Smoke Signals are released under the Mozilla Public License 2.0

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more