Is there any function can be used to monitor or handle package loss?
bethebest0622 opened this issue · comments
I used libwebsockets as a client to pass data with sever.
it worked very well, but sometimes it seems lose package.
the sitution is:
- 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)
- 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
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).