tests run fine. but it needs some more user testing

This commit is contained in:
Kevin Jahns
2014-10-02 21:14:37 +02:00
parent 968e07a8ff
commit 3415d0ee5e
56 changed files with 1329 additions and 457 deletions

View File

@@ -39,6 +39,7 @@ createPeerJsConnector = ()->
@peer = peer
@connections = {}
@new_connection_listeners = []
@peer.on 'connection', (conn)=>
@addConnection conn
@@ -82,6 +83,9 @@ createPeerJsConnector = ()->
for conn_id of @connections
conn_id
onNewConnection: (f)->
@new_connection_listeners.push f
#
# Adds an existing connection to this connector.
# @param conn {PeerJsConnection}
@@ -105,6 +109,8 @@ createPeerJsConnector = ()->
if not data.initialized
conn.send
conns: @getAllConnectionIds()
@new_connection_listeners.map (f)->
f(conn)
else if data.op?
@engine.applyOp data.op
else if data.conns?