Performance increase: Send size and actual packet at once. This causes about 40% less total packets to be sent.

This commit is contained in:
Charles Lohr
2004-08-28 21:33:22 +00:00
parent d3fb44c32d
commit 08915de430
+1 -1
View File
@@ -273,7 +273,7 @@ int EzSockets::PeekData(char *data, unsigned int bytes)
void EzSockets::SendPack(const char *data, unsigned int bytes)
{
unsigned int SendSize = htonl(bytes);
SendData((const char *)&SendSize, sizeof(int));
outBuffer.append( (const char *) & SendSize, 4); //Add size to buffer, but don't send yet.
SendData(data, bytes);
}