[Pkg-javascript-commits] [sockjs-client] 19/434: ws transport renamed to websocket.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:46:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 7d48a5ad918b586ad41e7a487fec2013f85d87a1
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Sun Jul 24 20:57:54 2011 +0100

    ws transport renamed to websocket.
---
 lib/main.js                             | 2 +-
 lib/sockjs.js                           | 2 +-
 lib/{trans-ws.js => trans-websocket.js} | 2 +-
 tests-src/test-run.coffee               | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/main.js b/lib/main.js
index 4533a47..9a77b48 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -6,7 +6,7 @@ SockJS = (function(){
 <!-- include lib/simpleevent.js -->
 <!-- include lib/utils.js -->
 <!-- include lib/sockjs.js -->
-<!-- include lib/trans-ws.js -->
+<!-- include lib/trans-websocket.js -->
 <!-- include lib/trans-jsonp-sender.js -->
 <!-- include lib/trans-jsonp.js -->
 <!-- include lib/trans-iframe.js -->
diff --git a/lib/sockjs.js b/lib/sockjs.js
index afca090..3946a7a 100644
--- a/lib/sockjs.js
+++ b/lib/sockjs.js
@@ -8,7 +8,7 @@ var SockJS = function(url, protocols, options) {
     this._server = this._options.server || utils.random_number_string(1000);
     this._connid = utils.random_string(8);
     this._trans_url = this._base_url + '/' + this._server + '/' + this._connid;
-    this._protocols = ['ws', 'iframe-eventsource', 'jsonp'];
+    this._protocols = ['websocket', 'iframe-eventsource', 'jsonp'];
     switch(typeof protocols) {
     case 'undefined': break;
     case 'string': this._protocols = [protocols]; break;
diff --git a/lib/trans-ws.js b/lib/trans-websocket.js
similarity index 92%
rename from lib/trans-ws.js
rename to lib/trans-websocket.js
index 8bd977f..a3fef09 100644
--- a/lib/trans-ws.js
+++ b/lib/trans-websocket.js
@@ -1,4 +1,4 @@
-var WebSocketTransport = SockJS.ws = function(ri, trans_url) {
+var WebSocketTransport = SockJS.websocket = function(ri, trans_url) {
     var that = this;
     var url = trans_url + '/websocket';
     if (url.slice(0, 5) === 'https') {
diff --git a/tests-src/test-run.coffee b/tests-src/test-run.coffee
index a1eccf6..a14f97a 100644
--- a/tests-src/test-run.coffee
+++ b/tests-src/test-run.coffee
@@ -18,5 +18,5 @@ test_protocol = (protocol) ->
         asyncTest("invalid url port", test_invalid_url_port(protocol))
 
 
-for protocol in ['ws', 'jsonp', 'iframe-eventsource']
+for protocol in ['websocket', 'jsonp', 'iframe-eventsource']
     test_protocol(protocol)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list