Private Sub sockServer_DataArrival (Index As an Integer, ByVal bytesTotal As Long)
.
ScokServer (index). Getdata strtemp, vbstring
Doevents
.
End sub
I now on the server using the doevents, but still had a server sends data loss. Phenomenon can be stable in parallel for a period of time, after this time will be randomly in a certain loss of data on the client
CodePudding user response:
My idea is: will get package to check every time, without correct sends the message that retransmission, till the end,CodePudding user response:
I am sending three times but not received the data, is winsock to run for a period of time will not be able to trigger DataArrival receive less than dataCodePudding user response:
Top by oneselfCodePudding user response:
Some routing connection for a long time after you didn't send and receive data will close the connection and the connection is closed on both sides will not trigger to like pulling cable to avoid this kind of situation will have a heartbeat packet mechanism has confirmed that the client and server is returnedCodePudding user response:
I send a heartbeat, connection is not DataArrival accordinglyCodePudding user response:
I also send a heartbeat packet, is the server without receiving data no trigger DataArrival events,CodePudding user response:
Don't know how many predecessors in the TCP SocketSend (many) send (less) send (wealth)
Has been so much illness recv (), recv (wealth)
Inside the trap!
http://bbs.csdn.net/topics/380167545
CodePudding user response:
A) you are dealing with speed to keep up with the data receiving, data buffer overflow and result in lost data,Separate the receiving and processing procedures, asynchronous transfer data through documents,
B) the number of client connection too much at the same time,
To switch to the token cycle, only hold the token of the client to send data,
CodePudding user response:
Is not the amount of data, packet loss, with different network assistant will also have such phenomenon of packet loss, whether related to computer configurationCodePudding user response:
Agreement is not TCP UDP?UDP is allows packet loss,
CodePudding user response:
The protocol is TCPCodePudding user response:
The sender send not successful case?CodePudding user response:
The send is sent out, and DTU hardware communication serial port has detected data, but the server is not received data, caught the software also can not find the dataCodePudding user response:
Baud rate is too high, the line is not stable? So should send not success,This doesn't sound like a problem, can only suspect a hardware failure,