Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tokeshu/smoke-signals

A simple WebRTC signaling server
https://github.com/tokeshu/smoke-signals

signaling-server webrtc

Last synced: about 2 months ago
JSON representation

A simple WebRTC signaling server

Awesome Lists containing this project

README

        

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](http://www.mozilla.org/MPL/2.0/)