1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| void __fastcall TServer1Form::TcpServerConnect(TIdPeerThread *AThread)
{
nThreadNumber++;
tClThread[nThreadNumber] = AThread;
AThread->Connection->WriteLn("Connexion avec le serveur OK ...");
}
//---------------------------------------------------------------------------
void __fastcall TServer1Form::TCPServerExecute(TIdPeerThread *AThread)
{
AnsiString strTmp;
int i, j;
while (AThread->Connection->Connected())
{
strTmp = AThread->Connection->ReadLn();
if (strTmp[0] == '$')
{
tClThread[i]->Connection->WriteLn(strTmp);
}
}
} |
Partager