Can you send your clients code?
My problem is if i restart server, but clients still work, then when server starts, it have too many connections, and I cant identify client with its id...
void __fastcall Tfm::FormClose(TObject *Sender, TCloseAction &Action)
{
try {
if(client->Active) client->Socket->Disconnect( client->Socket->SocketHandle );
} catch (...) {
}
client->Active=0;
}
//---------------------------------------------------------------------------
void __fastcall Tfm::FormCreate(TObject *Sender)
{ client->Address="127.0.0.1";
client->Port=8000;
client->Active=1;
}
//---------------------------------------------------------------------------
void __fastcall Tfm::Timer1Timer(TObject *Sender)
{
if (!client->Active) client->Active=1;
}