The problem of the loss of request response in the front-end websocket

in the use of websocket, it is found that if requests are sent continuously, some requests will not receive a response.

assume that 5 call requests are issued in a row

ws.send(1);
ws.send(1);
ws.send(1);
ws.send(1);
ws.send(1);

but not every send receives a response, and the number of responses lost each time is uncertain
clipboard.png

I would like to ask whether this situation is a question of foreground and background interaction, or whether the mechanism of websocke itself may cause this problem

ask the bosses for advice

Mar.02,2021

will not be lost. It is based on tcp and should be merged

.
Menu