diff options
author | Loïc Hoguin <[email protected]> | 2012-03-20 12:36:11 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-03-20 12:36:11 +0100 |
commit | 6b3566ca0b7dd0c4bce7fa14ed1cce3e2813418a (patch) | |
tree | 4329a2901f0f98a2089858b63bec60d4f7f1c796 | |
parent | 64fcd99b93dcd911d26656ee4bc5359b80b7e955 (diff) | |
download | bullet-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.js | 3 |
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); }; |