> I was looking over my project and see that the processmessages loop I
> said allows the program to complete successfully is enabled. To allow
> the error this needs to be commented out. It's at the end of
> WSocketServerClientConnect.

I removed these lines.
However it works (basically) with the changes posted in my previous
message with latest ICSv7 and C++ Builder 2007. 

Tested with NNTP and HTTP (8 local clients). But since you use 
LineMode there's a problem with binary data because DataAvailable
might not trigger when LineEnd is not received. Use LineMode only 
if the protocol is 100% line-based. 

There's also a bug with shutting down the local client.
After a call to ShutDown(1) it is no longer allowed to send data,
however there might be still data in component's send buffer, so
in order to avoid a socket exception and to make sure the local 
client gets everything add a flag to your client class and handle
event OnDataSent, something like:     

void __fastcall TSocketWin::ClientDataSent(TObject *Sender, WORD ErrCode)
  if (client->closeflag)


void __fastcall TSocketWin::RemoteSessionClosed(TObject *Sender, WORD Error)
   if (client->AllSent)
       client->closeflag = true;

Arno Garrels
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to