Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: slow clients interference #2

Open
lars18th opened this issue Apr 6, 2018 · 1 comment
Open

Issue: slow clients interference #2

lars18th opened this issue Apr 6, 2018 · 1 comment

Comments

@lars18th
Copy link

lars18th commented Apr 6, 2018

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.

@madmax-X
Copy link

madmax-X commented Dec 8, 2024

i believe a side effect of this issue is that when connect directly to the rtl_tcp socket a certain decoder works fine, as soon as i startup rtlmux and switch the clients to the mux port on the same machine the digital decoding just stops, my guess is that the traqnsmissions are dropping packets due to the multiplexing of the stream, no single client gets all the data

your solution should solve this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants