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

Websocket - Long Latency #810

Open
harveyliuit opened this issue Mar 26, 2024 · 3 comments
Open

Websocket - Long Latency #810

harveyliuit opened this issue Mar 26, 2024 · 3 comments

Comments

@harveyliuit
Copy link

I Tried to implement a websocket client. However, the packet got delayed more and more, almost exponentially. Does F-stack have issues with long running TCP connections? Can someone know please help? Thank you in advance.

@freak82
Copy link

freak82 commented Mar 26, 2024

I guess the question from #811 is related to this issue that you have.
Having in mind the things that I pointed out there, I'd say that:

  • for the receiving side you need to make sure that you are calling epoll and/or read/recv on the corresponding socket in order to get the received data as soon as they arrive
  • for the sending side you can play with the pkt_tx_delay option to see if it'll improve the latency. If you test with single connection with very few packets sent then every packet will be delayed up to pkt_tx_delay microseconds and this will slow down the whole connection. The default value of this option is there for the most common case where you have big number of connections and each one of them is sending packets at full speed i.e. it's there for high throughput scenarios.

@harveyliuit
Copy link
Author

Thank you very much @freak82! I'll look into it.

@vewe-richard
Copy link

@harveyliuit Have you build websocket client via f-stack? Which websocket opensource project did you base on? or You just wrote it from scratch?
I even can't make a tcp client via f-stack, I got problem as described below.
#624

Can you please help a look? Or Can you share me the client code you run for test?

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

3 participants