mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-12 16:38:12 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
331e6e85b9 | ||
|
|
f2df40aa02 | ||
|
|
36ecd49ad2 | ||
|
|
aef5027640 | ||
|
|
4933cf1a9e |
@@ -1,4 +1,12 @@
|
||||
|
||||
0.7.2 / 2011-06-22
|
||||
==================
|
||||
|
||||
* Make sure to write a packet (of type `noop`) when closing a poll.
|
||||
This solves a problem with cross-domain requests being flagged as aborted and
|
||||
reconnection being triggered.
|
||||
* Added `noop` message type.
|
||||
|
||||
0.7.1 / 2011-06-21
|
||||
==================
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ var packets = exports.packets = [
|
||||
, 'event'
|
||||
, 'ack'
|
||||
, 'error'
|
||||
, 'noop'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ var http = require('http')
|
||||
* Version.
|
||||
*/
|
||||
|
||||
exports.version = '0.7.0';
|
||||
exports.version = '0.7.2';
|
||||
|
||||
/**
|
||||
* Supported protocol version.
|
||||
|
||||
@@ -56,7 +56,7 @@ HTTPPolling.prototype.handleRequest = function (req) {
|
||||
var self = this;
|
||||
|
||||
this.pollTimeout = setTimeout(function () {
|
||||
self.close();
|
||||
self.packet({ type: 'noop' });
|
||||
self.log.debug('polling closed due to exceeded duration');
|
||||
}, this.manager.get('polling duration') * 1000);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "socket.io"
|
||||
, "version": "0.7.1"
|
||||
, "version": "0.7.2"
|
||||
, "description": "Realtime apps made cross-browser & easy with a WebSocket-like API"
|
||||
, "homepage": "http://socket.io"
|
||||
, "keywords": ["websocket", "socket", "realtime", "socket.io", "comet", "ajax"]
|
||||
@@ -15,7 +15,7 @@
|
||||
, "url": "https://github.com/LearnBoost/Socket.IO-node.git"
|
||||
}
|
||||
, "dependencies": {
|
||||
"socket.io-client": "0.7.0"
|
||||
"socket.io-client": "0.7.2"
|
||||
, "policyfile": ">= 0.0.3"
|
||||
}
|
||||
, "devDependencies": {
|
||||
|
||||
@@ -178,9 +178,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
// we rely on a small poll duration to close this request quickly
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, data) {
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
--total || finish();
|
||||
});
|
||||
});
|
||||
@@ -459,8 +460,9 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, data) {
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, msgs) {
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
tobi();
|
||||
|
||||
@@ -649,9 +651,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, data) {
|
||||
cl.get('/socket.io/{protocol}/jsonp-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/jsonp-polling/' + sid
|
||||
|
||||
@@ -114,9 +114,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
// we rely on a small poll duration to close this request quickly
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
--total || finish();
|
||||
});
|
||||
});
|
||||
@@ -395,8 +396,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
tobi();
|
||||
|
||||
@@ -585,9 +588,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
@@ -724,9 +728,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.json.send(['a', 'b', 'c']);
|
||||
s.json.send({
|
||||
@@ -785,9 +790,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
@@ -837,9 +843,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.emit('tobi is playing');
|
||||
|
||||
@@ -879,9 +886,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.emit('edwald', { woot: 'woot' }, [1, 2, 3]);
|
||||
|
||||
@@ -924,9 +932,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
@@ -971,9 +980,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
@@ -1012,15 +1022,17 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.volatile.send('woooot');
|
||||
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1047,15 +1059,17 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.volatile.json.send('woooot');
|
||||
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1082,15 +1096,17 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
s.volatile.emit('woooot');
|
||||
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1236,9 +1252,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
@@ -2509,9 +2526,10 @@ module.exports = {
|
||||
});
|
||||
|
||||
cl.handshake(function (sid) {
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, data) {
|
||||
res.statusCode.should.eql(200);
|
||||
data.should.eql('');
|
||||
cl.get('/socket.io/{protocol}/xhr-polling/' + sid, function (res, msgs) {
|
||||
res.statusCode.should.equal(200);
|
||||
msgs.should.have.length(1);
|
||||
msgs[0].should.eql({ type: 'noop', endpoint: '' });
|
||||
|
||||
cl.post(
|
||||
'/socket.io/{protocol}/xhr-polling/' + sid
|
||||
|
||||
Reference in New Issue
Block a user