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

Is there any function can be used to monitor or handle package loss? #3168

Open
bethebest0622 opened this issue Jun 13, 2024 · 1 comment
Open

Comments

@bethebest0622
Copy link

bethebest0622 commented Jun 13, 2024

I used libwebsockets as a client to pass data with sever.

it worked very well, but sometimes it seems lose package.

the sitution is:

  1. lws_write to send_request to server, the return value is good, but no response (I codebug with server IT, it proved they didnt receive the request)
  2. server send data, i didn't receive it (I run the same code in two server, one received, one not, so i confirmed it's a package loss)

I know package loss is a network layer problem, maybe unavoidable in libwebsockets.

but is there any methods i can use to monitor it or reduce this siutation?

Thanks

@lws-team
Copy link
Member

This is maybe a bit confused... we're not using UDP which just sends a single packet, we're using TCP. It will resend packets after a short timeout. So it's fairly immune to loss of a single packet.

It sounds like something else is going on (tcpdump is useful to see what's really happening on the wire at each end, without trying to "prove" it).

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