├── .gitignore
├── .jshintrc
├── .travis.yml
├── .zuul.yml
├── CONTRIBUTING.md
├── LICENCE
├── Procfile
├── README.md
├── browser
└── index.js
├── demo
├── index.html
└── media.html
├── package.json
├── server
└── index.js
├── socketpeer.js
├── socketpeer.min.js
└── test
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | *.csv
2 | *.dat
3 | *.floo*
4 | *.gz
5 | *.log
6 | *.out
7 | *.pid
8 | *.seed
9 | build/
10 | data/
11 | lib-cov
12 | logs
13 | node_modules
14 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "esnext": true
3 | }
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '0.10'
4 | env:
5 | global:
6 | - secure: hYrrXu5o3kRv+AGBoTpUT1ybT32j79q4Cq2GnJgtc0ACL1mBut+KbmG1R9NHtcrHhHigRVmZfDmijaU50QgmDjmbCe+D0ZohYXNxd+qhBbN9pNlrx3P5B8HUaiYAH06b+z8PK5qlXmrnkRFkZJGrdvfeJwEXyQmnkbDsj7bWxy0=
7 | - secure: ZXyh5RmQos+QVmIftsALdh/gwbJvAxbfrHTc6J0b2V5GJN2CP6LblVf4YcmddSx1cin0C7uipzoL1pnj7MLaDgpk4LUzIFp852TV+3v7zGLI/TQkdnuMtaOWdk07aw2xKCzMfvyhjKDqy+6QSAhlR84M/n+APZRccPAYQdIM6s0=
8 |
--------------------------------------------------------------------------------
/.zuul.yml:
--------------------------------------------------------------------------------
1 | ui: tape
2 | browsers:
3 | - name: chrome
4 | version: latest
5 | - name: firefox
6 | version: latest
7 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributions are very welcome. Before contributing, please note the following:
2 |
3 | * You agree to licence your contributions under the [licence](LICENCE).
4 | * If contributing code, follow [jshint](http://www.jshint.com/) and our other [style-guide conventions](http://mozweb.readthedocs.org/en/latest/index.html).
5 | * When appropriate, please write tests and update the docs (i.e., the [README](README.md)).
6 |
7 | Thank you - and happy contributing!
8 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright © 2015 Chris Van and Matthew Claypotch
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: npm run prod
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SocketPeer
2 |
3 | Simple 1:1 messaging via [WebRTC Data Channels](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel) and [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API).
4 |
5 | [Read this great **walk-through article**.](https://hacks.mozilla.org/2015/04/peering-through-the-webrtc-fog-with-socketpeer/)
6 |
7 | [**View a live demo** of a project using SocketPeer!](https://socketpeer-test.herokuapp.com/) See the (project's [source code](https://github.com/potch/test-socketpeer)).
8 |
9 |
10 | ## Features
11 |
12 | * concise, [Node.js](https://nodejs.org/)-style API for **[WebRTC](https://en.wikipedia.org/wiki/WebRTC)** peer-to-peer connections
13 | * simple 1:1 peer connection signalling, pairing, and messaging
14 | * fallback WebSocket support if WebRTC Data Channels are unsupported
15 | * automatic reconnection if peer connections prematurely close
16 | * exports as a [UMD](https://github.com/umdjs/umd) module, so the library works everywhere (i.e., using [Browserify](http://browserify.org/), [webpack](https://webpack.js.org/), or included by a `
22 |
42 |
96 |