Comparing version 3.6.8 to 3.7.0
@@ -17,3 +17,3 @@ /* --------------------------------------------------------------------------- | ||
pubnub.publish({ | ||
post: false, | ||
post: false, | ||
channel : 'PubNubTest_RX', | ||
@@ -20,0 +20,0 @@ message : { 'test' : 'f?ds' }, |
@@ -5,5 +5,5 @@ | ||
var pubnub = PUBNUB({ | ||
publish_key : "demo-36", | ||
subscribe_key : "demo-36", | ||
origin : "gcm-beta.pubnub.com" | ||
publish_key : "demo-36", | ||
subscribe_key : "demo-36", | ||
origin : "gcm-beta.pubnub.com" | ||
}); | ||
@@ -17,3 +17,3 @@ | ||
// set callback method | ||
// set callback method | ||
a.callback = console.log | ||
@@ -59,3 +59,3 @@ | ||
c.apns.key = "hi am apns" | ||
c.mykey = "hi" | ||
c.mykey = "hi" | ||
@@ -79,11 +79,11 @@ c.publish() | ||
// and this too | ||
// and this too | ||
var d = PNmessage({ | ||
'callback' : console.log, | ||
'error' : console.log, | ||
'channel' : 'push', | ||
'apns' : {'alert' : "this is alert", 'badge' : 2, 'key' : "hi am apns"}, | ||
'gcm' : {"message":"be sure not to send objects!", "foo":"bar" }, | ||
'mykey' : "hi" | ||
'callback' : console.log, | ||
'error' : console.log, | ||
'channel' : 'push', | ||
'apns' : {'alert' : "this is alert", 'badge' : 2, 'key' : "hi am apns"}, | ||
'gcm' : {"message":"be sure not to send objects!", "foo":"bar" }, | ||
'mykey' : "hi" | ||
}); | ||
@@ -93,4 +93,4 @@ | ||
// and this as well | ||
// and this as well | ||
d.publish() |
@@ -32,3 +32,3 @@ /* --------------------------------------------------------------------------- | ||
for (var i = 1; i < 2; i++) { | ||
publish('dsm-test',i); | ||
publish('dsm-test',i); | ||
} |
@@ -6,4 +6,4 @@ | ||
var pubnub = PUBNUB({ | ||
publish_key : "demo", | ||
subscribe_key : "demo" | ||
publish_key : "demo", | ||
subscribe_key : "demo" | ||
}); | ||
@@ -20,51 +20,51 @@ | ||
pubnub.subscribe({ | ||
'channel' : 'abcd', | ||
'connect' : function(r) { | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage1, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage2, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage3, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
}, | ||
'callback' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
'channel' : 'abcd', | ||
'connect' : function(r) { | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage1, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage2, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
pubnub.publish({ | ||
channel : 'abcd', | ||
message : pnmessage3, | ||
callback : function(r) { | ||
console.log(r); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}); | ||
}, | ||
'callback' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
}, | ||
'error' : function(r) { | ||
console.log(JSON.stringify(r)); | ||
} | ||
}) | ||
@@ -71,0 +71,0 @@ |
{ | ||
"name": "pubnub", | ||
"preferGlobal": false, | ||
"version": "3.6.8", | ||
"version": "3.7.0", | ||
"author": "PubNub <stephen@pubnub.com>", | ||
@@ -6,0 +6,0 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub", |
@@ -5,4 +5,4 @@ var PUBNUB = require('../pubnub.js') | ||
function subscribe(channel) { | ||
function subscribe(channel) { | ||
/* | ||
@@ -9,0 +9,0 @@ create container |
@@ -20,4 +20,4 @@ var test_channel_count = 1000; | ||
console.log( 'connected to', ++channel_count, 'channels' ); | ||
setTimeout( function() { | ||
setTimeout( function() { | ||
// Send Message | ||
@@ -28,3 +28,3 @@ pubnub(channel).publish({ | ||
}); | ||
}, 100 * a ); | ||
@@ -31,0 +31,0 @@ } |
@@ -136,3 +136,3 @@ /* --------------------------------------------------------------------------- | ||
options.keepAlive= !!keepAliveAgent; | ||
options.agent = keepAliveAgent; | ||
//options.agent = keepAliveAgent; | ||
options.body = payload; | ||
@@ -144,4 +144,4 @@ | ||
response.setEncoding('utf8'); | ||
response.on( 'error', function(){console.log('error');done(1, body || { "error" : "Network Connection Error"})}); | ||
response.on( 'abort', function(){console.log('abort');done(1, body || { "error" : "Network Connection Error"})}); | ||
response.on( 'error', function(){done(1, body || { "error" : "Network Connection Error"})}); | ||
response.on( 'abort', function(){done(1, body || { "error" : "Network Connection Error"})}); | ||
response.on( 'data', function (chunk) { | ||
@@ -148,0 +148,0 @@ if (chunk) body += chunk; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
245964
38
5699