Giter Site home page Giter Site logo

Comments (3)

jumperchen avatar jumperchen commented on August 26, 2024

I fixed some issues which may relate to this issue, you can give it a try. (remember to run pub upgrade first), and I also make a test case with a timer to demonstrate the problem you encountered, but it works well for me on both dartium or browser (compiling to js) environment.

from socket.io-client-dart.

NickWu007 avatar NickWu007 commented on August 26, 2024

Hi,

I have been having the same problem, but slightly different.

On pub serve things are working fine, but on pub build, locally I would get a few 400 errors but eventually succeed to connect. Below is a screenshot:

screen shot 2018-02-01 at 16 24 04

I am also deploying my app on digital ocean VPS and over there I would get a huge number of 400 errors(with same response body), and finally connect after 1 or 2 minutes. Below is a screenshot of network activities on VPS.

screen shot 2018-01-30 at 20 53 21
screen shot 2018-01-30 at 20 56 02

My server is written in node:

var app = express()
var server = http.createServer(app);
server.listen(port);
var io = require('socket.io').listen(server);

I am using namespaces also, for each client:

var socketPath = '/' + req.session.user.username
io.of(socketPath).on('connection', function (socket) {
    ...
}

Client:

String namespace = 'http://localhost:5000' + socketPath;
print('connecting to $namespace');
socket = IO.io(namespace);
socket.on('connect', (_) {
        print('connected to $namespace');
        ....
}

As far as I can see there's very little custom config used. Could you please take a look as this? I can discuss more in detail. This lib is critical for my project, so please help.

Thanks,
Nick

from socket.io-client-dart.

jumperchen avatar jumperchen commented on August 26, 2024

This issue is fixed in https://github.com/rikulo/socket.io-dart, so you should upgrade them by running pub upgrade.

from socket.io-client-dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.