Coder Social home page Coder Social logo

rtlmux's People

Contributors

slepp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rtlmux's Issues

Issue: slow clients interference

Hi,

When two or more clients are connected, and one of them is "slow" this generates troubles with the rest.

One "slow" client is one that has some internal trouble and at some point it reads samples more slowly than the rest. Even if this is a puntual problem, as the transport protocol is TCP and the internal loop is blocking, this generates glitches in the rest of clients. Moreover, if this slow client disconnects the others continue suffering the trouble. So the only solution is disconnect all of them and reconnect.

I isolated the problem with this part of the code:
https://github.com/slepp/rtlmux/blob/master/rtlmux.c#L124

The problem seems to have only one queue of data and do writes in the TCP sockets in a blocking mode. So one idea to fix this behaviour can be: create one output queue for each client and do fast-writes to these queues from the incoming socket. Then all clients will consume from his queue and not generates troubles in the rest.

What do you think?
Regards.

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.