|Subject:||Re: Problem with Telnet clients|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Thu, 10 Feb 2005|
"A. Stern" <ahCUT…@CUTvtr.net> wrote in message
> I'm using BCB 6.0 Enterprise Suite with Indy 8.0.25 on Windows 2000.
That is a very old version of Indy. You should seriously consider
> AnsiString IP;
> IP = CuLAMainForm->UnsoModList->Strings[ModemIdx*5];
That code is not thread-safe. You should be using TThread::Synchronize() to
access the main thread objects in a thread-safe manner.
> ATelnetClient->OnDataAvailable = &ATelnetClientOnDataAvailable;
By default, the OnDataAvailable event is triggered via a call to
That loop is too tight. It does not yield CPU cycles to other threads.
That could be causing some of your problems, especially if Synchronize() is
not able to execute the OnDataAvailable code in a timely fashion. You
should put a call to Sleep() in the loop:
while( ATelnetClient->Connected() )
Problem with Telnet clients posted by A. Stern on Thu, 10 Feb 2005