[Pkg-javascript-commits] [sockjs-client] 171/434: Idiomatic api now uses `createServer`

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:11 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 e1184f71f9edb3531a31eb0424cfbe8780b52a0e
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Tue Oct 18 13:20:42 2011 +0100

    Idiomatic api now uses `createServer`
---
 tests/sockjs_app.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/sockjs_app.js b/tests/sockjs_app.js
index 2ee8c14..3e3b418 100644
--- a/tests/sockjs_app.js
+++ b/tests/sockjs_app.js
@@ -1,7 +1,7 @@
 var sockjs = require('sockjs');
 
 exports.install = function(config, server) {
-    var sjs_echo = new sockjs.Server(config.opts);
+    var sjs_echo = sockjs.createServer(config.opts);
     sjs_echo.on('connection', function(conn) {
                     console.log('    [+] echo open    ' + conn);
                     conn.on('close', function() {
@@ -16,7 +16,7 @@ exports.install = function(config, server) {
                             });
                 });
 
-    var sjs_close = new sockjs.Server(config.opts);
+    var sjs_close = sockjs.createServer(config.opts);
     sjs_close.on('connection', function(conn) {
                      console.log('    [+] clos open    ' + conn);
                      conn.close(3000, "Go away!");
@@ -25,7 +25,7 @@ exports.install = function(config, server) {
                              });
                  });
 
-    var sjs_ticker = new sockjs.Server(config.opts);
+    var sjs_ticker = sockjs.createServer(config.opts);
     sjs_ticker.on('connection', function(conn) {
                       console.log('    [+] ticker open   ' + conn);
                       var tref;
@@ -41,7 +41,7 @@ exports.install = function(config, server) {
                   });
 
     var broadcast = {};
-    var sjs_broadcast = new sockjs.Server(config.opts);
+    var sjs_broadcast = sockjs.createServer(config.opts);
     sjs_broadcast.on('connection', function(conn) {
                          console.log('    [+] broadcast open ' + conn);
                          broadcast[conn.id] = conn;
@@ -57,7 +57,7 @@ exports.install = function(config, server) {
                                  });
                      });
 
-    var sjs_amplify = new sockjs.Server(config.opts);
+    var sjs_amplify = sockjs.createServer(config.opts);
     sjs_amplify.on('connection', function(conn) {
                     console.log('    [+] amp open    ' + conn);
                     conn.on('close', function() {

-- 
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