How come if I connect 20 or more clients to this simple server I don't see time differences on the various clients?
I expected at least a few milliseconds of difference between the various clients that receive the data.
thanks
- Code: Select all
void __fastcall TMyThread1::MySincrSock1()
{
int bytesent=0;
AnsiString old = msg;
int sizemessage;
try{
for(int actconn = 0; actconn < Form1->ServerSocket1->Socket->ActiveConnections; actconn++)
{
msg+="," + IntToStr(GetTickCount()) + "," + IntToStr(actconn)+ ";\r\n";
sizemessage = msg.Length();
do
{
bytesent = Form1->ServerSocket1->Socket->Connections[actconn]->SendBuf(msg.c_str(), msg.Length());
sizemessage -= bytesent;
}
while(sizemessage > 0);
msg=old;
}
} catch(...) { }
}
//---------------------------------------------------------------------------