Net::recv got bad connected receive event error
by Danni · in Torque Game Engine Advanced · 08/12/2007 (1:30 pm) · 2 replies
I derived a few classes using TelnetConsole code as a base. I found an interesting condition. If you receive data at a fast rate (i.e. multiple sends from a server in a row) you get an "got bad connected receive event" in the console and the send is gobbled.
Adding a while loop around the receiving end seams to fix this.
Adding a while loop around the receiving end seams to fix this.
while (numBytes != -1) {
Net::Error err = Net::recv(mSocket, (unsigned char*)recvBuf, sizeof(recvBuf), &numBytes);
.....
}
Torque 3D Owner Danni