broker tracking a heap of snowflakes

This commit is contained in:
Serene Han 2016-01-21 10:44:14 -08:00
parent 28e557fb43
commit 0cd6852ad0
5 changed files with 183 additions and 20 deletions

View file

@ -21,7 +21,6 @@ class Broker
xhr = new XMLHttpRequest()
try
xhr.open 'POST', @url
xhr
catch err
###
An exception happens here when, for example, NoScript allows the domain on
@ -35,14 +34,14 @@ class Broker
# xhr.responseType = 'text'
xhr.onreadystatechange = ->
if xhr.DONE == xhr.readyState
log 'Broker: ' + xhr.status
if 200 == xhr.status
log 'Broker: success'
log 'Response: ' + xhr.responseText
# @fac_complete xhr.responseText
log xhr
else
log 'Broker error ' + xhr.status + ' - ' + xhr.statusText
xhr.send 'snowflake-testing'
log "Broker: sent a registration message, waiting for reply..."
sendAnswer: (answer) ->
log 'Sending answer to broker.'

View file

@ -8,7 +8,7 @@ Assume that the webrtc client plugin is always the offerer, in which case
this must always act as the answerer.
###
DEFAULT_WEBSOCKET = '192.81.135.242:9901'
DEFAULT_BROKER = 'https://snowflake-reg.appspot.com/reg/test'
DEFAULT_BROKER = 'https://snowflake-reg.appspot.com/proxy'
DEFAULT_PORTS =
http: 80
https: 443