Permalink
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
1 parent d1dd321 commit d55caf5629ca08349e1fe2b556467815bb6b6e6a Gun.io Whitespace Robot committed Dec 16, 2011
Showing with 17 additions and 17 deletions.
  1. +4 −4 bin/config.json
  2. +4 −4 config.json
  3. +8 −8 lib/websocketModule.js
  4. +1 −1 lib/ws.js
View
8 bin/config.json
@@ -1,18 +1,18 @@
{
"channels": [
{
- "name":"Trades",
- "key":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21",
+ "name":"Trades",
+ "key":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21",
"private":"trade"
},
{
"name":"MtGox Tick",
- "key":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f",
+ "key":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f",
"private": "ticker"
},
{
"name":"All Market",
- "key":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe",
+ "key":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe",
"private":"depth"
}
]
View
8 config.json
@@ -1,18 +1,18 @@
{
"channels": [
{
- "name":"Trades",
- "key":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21",
+ "name":"Trades",
+ "key":"dbf1dee9-4f2e-4a08-8cb7-748919a71b21",
"private":"trade"
},
{
"name":"MtGox Tick",
- "key":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f",
+ "key":"d5f06780-30a8-4a48-a2f8-7ed181b4a13f",
"private": "ticker"
},
{
"name":"All Market",
- "key":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe",
+ "key":"24e67e0d-1cad-4cc0-9e7a-f8523ef460fe",
"private":"depth"
}
]
View
16 lib/websocketModule.js
@@ -40,7 +40,7 @@ var createSecretKey = function() {
// [0x21, 0x2f] (14 characters) and [0x3a, 0x7e] (68 characters)
var numChars = 1 + Math.floor(Math.random() * 12);
assert.ok(1 <= numChars && numChars <= 12);
-
+
for (var i = 0; i < numChars; i++) {
var pos = Math.floor(Math.random() * s.length + 1);
@@ -69,7 +69,7 @@ var createSecretKey = function() {
// Generate a challenge sequence
var createChallenge = function() {
- var c = '';
+ var c = '';
for (var i = 0; i < 8; i++) {
c += String.fromCharCode(Math.floor(Math.random() * 255));
}
@@ -87,7 +87,7 @@ var secretKeyValue = function(sk) {
for (var i = 0; i < sk.length; i++) {
var cc = sk.charCodeAt(i);
-
+
if (cc == 0x20) {
ns++;
} else if (0x30 <= cc && cc <= 0x39) {
@@ -104,7 +104,7 @@ var secretKeyValue = function(sk) {
// byte string
var secretKeyHashValue = function(sk) {
var skv = secretKeyValue(sk);
-
+
var hv = '';
hv += String.fromCharCode((skv >> 24) & 0xff);
hv += String.fromCharCode((skv >> 16) & 0xff);
@@ -116,7 +116,7 @@ var secretKeyHashValue = function(sk) {
// Compute the secret key signature based on two secret key strings and some
// handshaking data.
-var computeSecretKeySignature = function(s1, s2, hs) {
+var computeSecretKeySignature = function(s1, s2, hs) {
assert.equal(hs.length, 8);
var hash = crypto.createHash('md5');
@@ -131,7 +131,7 @@ var computeSecretKeySignature = function(s1, s2, hs) {
// Return a hex representation of the given binary string; used for debugging
var str2hex = function(str) {
var hexChars = [
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f'
];
@@ -320,7 +320,7 @@ var WebSocket = function(url, proto, opts) {
if (serverClosed) {
serverCloseHandler();
}
-
+
if (consumed == 0) {
bufs.push(buf.slice(off, buf.length));
bufsBytes += buf.length - off;
@@ -431,7 +431,7 @@ var WebSocket = function(url, proto, opts) {
// Connect and perform handshaking with the server
(function() {
- // Parse constructor arguments
+ // Parse constructor arguments
if (!url) {
throw new Error('Url and must be specified.');
}
View
2 lib/ws.js
@@ -23,7 +23,7 @@ var HookSocket = exports.HookSocket = function(options){
ws.on('wserror', function(e){
self.emit('websocket::error', e);
});
-
+
ws.on('close', function(){
self.emit('websocket::close');
});

0 comments on commit d55caf5

Please sign in to comment.