Hi All, subject :How to send data to the all clients in thread if we have data in main vcl form method
I am buiding a multithreaded Server that sends data to client based on Mtsvr sample Now every client run its in own thread by the following code void __fastcall TServerForm::ServerWSocketSessionAvailable(TObject *Sender, WORD Error) { TClientThread *ClientThread; // Create a new thread to handle client request ClientThread = new TClientThread(ServerWSocket->Accept()); // Assign the thread's OnTerminate event ClientThread->OnTerminate = ClientThreadTerminate; // Add the thread to the listbox which is our client list ClientListBox->Items->Add(IntToHex(Integer(ClientThread), 8)); // Then start the client thread work // because it was created in the blocked state ClientThread->Resume(); } Now in each thread every client communicate by sending and receiving data . Now I am facing very tough problem .I have the data in main vcl TServerForm that I need to send to all clients at same time . there is a event trigger in TServerForm at which I need to sent data to all clients running in thread. How can I solve the issue Rajesh -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be