You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 14, 2024. It is now read-only.
I'm getting a crash when I try and connect to a very simple test SocketIO server setup to use XHR (as it will run on Heroku). At the moment I'm just testing locally on my Mac and when I try and connect to the server it crashes as line 243 of SocketIOTransport.m:
I downloaded a Zip of the master today which is what I am using in the project so I asume that is the tip revision.
The server code looks like this:
var port = process.env.PORT || 5000;
var express = require('express');
var http = require('http');
var app = express();
var server = http.createServer(app);
var io = require('socket.io').listen(server);
I'm getting a crash when I try and connect to a very simple test SocketIO server setup to use XHR (as it will run on Heroku). At the moment I'm just testing locally on my Mac and when I try and connect to the server it crashes as line 243 of SocketIOTransport.m:
I downloaded a Zip of the master today which is what I am using in the project so I asume that is the tip revision.
The server code looks like this:
var port = process.env.PORT || 5000;
var express = require('express');
var http = require('http');
var app = express();
var server = http.createServer(app);
var io = require('socket.io').listen(server);
app.get('/', function(request, response) {
response.send('Running');
});
server.listen(port);
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling duration", 10);
});
io.sockets.on('connection', function (socket) {
console.log("Connection made");
});
EDIT - adding more info:
I'm running socket.io 0.9.16
here is the output on the server side:
20:58:42 web.1 | started with pid 76317
20:58:43 web.1 | info: socket.io started
20:58:51 web.1 | debug: client authorized
20:58:51 web.1 | info: handshake authorized -BD1OMQRzZDJCIo8HmHA
20:58:51 web.1 | debug: setting request GET /socket.io/1/xhr-polling/-BD1OMQRzZDJCIo8HmHA?t=1371153531155
20:58:51 web.1 | debug: setting poll timeout
20:58:51 web.1 | debug: client authorized for
20:58:51 web.1 | debug: clearing poll timeout
20:58:51 web.1 | debug: xhr-polling writing 1::
20:58:51 web.1 | debug: set close timeout for client -BD1OMQRzZDJCIo8HmHA
20:58:51 web.1 | Connection made
20:59:51 web.1 | debug: fired close timeout for client -BD1OMQRzZDJCIo8HmHA
20:59:51 web.1 | info: transport end (close timeout)
20:59:51 web.1 | debug: discarding transport
and on the iOS side:
2013-06-13 20:58:51.133 C4Response[76320:c07] Connecting to socket with URL: http://localhost:5000/socket.io/1/?t=16807
2013-06-13 20:58:51.149 C4Response[76320:c07] didReceiveResponse() 200
2013-06-13 20:58:51.149 C4Response[76320:c07] connectionDidFinishLoading() -BD1OMQRzZDJCIo8HmHA:60:60:xhr-polling
2013-06-13 20:58:51.149 C4Response[76320:c07] sid: -BD1OMQRzZDJCIo8HmHA
2013-06-13 20:58:51.153 C4Response[76320:c07] heartbeatTimeout: 67.000000
2013-06-13 20:58:51.154 C4Response[76320:c07] transports: (
"xhr-polling"
)
2013-06-13 20:58:51.154 C4Response[76320:c07] xhr polling supported -> using it now
The text was updated successfully, but these errors were encountered: