summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-03-20 12:36:11 +0100
committerLoïc Hoguin <[email protected]>2012-03-20 12:36:11 +0100
commit6b3566ca0b7dd0c4bce7fa14ed1cce3e2813418a (patch)
tree4329a2901f0f98a2089858b63bec60d4f7f1c796
parent64fcd99b93dcd911d26656ee4bc5359b80b7e955 (diff)
downloadbullet-6b3566ca0b7dd0c4bce7fa14ed1cce3e2813418a.tar.gz
bullet-6b3566ca0b7dd0c4bce7fa14ed1cce3e2813418a.tar.bz2
bullet-6b3566ca0b7dd0c4bce7fa14ed1cce3e2813418a.zip
Add a JS function to change the url being used for the stream
This doesn't reconnect the stream, just changes it for the next reconnection. This is useful if you need to change the arguments given each time you connect.
-rw-r--r--priv/bullet.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/priv/bullet.js b/priv/bullet.js
index 8730315..c593646 100644
--- a/priv/bullet.js
+++ b/priv/bullet.js
@@ -228,6 +228,9 @@
this.onclose = function(){};
this.onheartbeat = function(){};
+ this.setURL = function(newURL){
+ url = newURL;
+ };
this.send = function(data){
return transport.send(data);
};