Add initial collaboration package

This commit is contained in:
Kevin Sawicki
2013-06-20 09:28:06 -07:00
committed by Nathan Sobo
parent 0d252ab9fd
commit 66b490b5da
3 changed files with 2152 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
Peer = require './peer'
createConnection = ->
peer = new Peer('some-id1', {host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080})
peer.on 'connection', (connection) ->
console.log 'connection'
connection.on 'data', (data) ->
console.log('Got data:', data)
module.exports =
activate: ->
createConnection()
peer = new Peer('some-id2', {host: 'ec2-54-218-51-127.us-west-2.compute.amazonaws.com', port: 8080})
c2 = peer.connect('some-id1')
c2.on 'open', -> c2.send('test?')

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
'main': './lib/collaboration'