Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : IdTCPServer
| Subject: | IdTCPServer |
| Posted by: | "brandon" (someo..@microsoft.com) |
| Date: | Thu, 8 Jun 2006 14:16:56 |
Greetings,
I have an app that are using a IdTCPClient(v9.0.14) and IdTCPServer(v9.0.14)
compomnents to handle some messaging between peers(simple IRC).
Occasionally, the server will not allow clients to connect and gives the
following error:
Exception 'EIdSocketError' in module XXX.exe at 0020537B
Socket Error # 0
Source file: IdStack.pas, Line 223
Call stack:
:Idstack.TIdStack.RaiseSocketError (IdStack.pas, line 223)
:Idtcpconnection.TIdTCPConnection.WriteBuffer (IdTCPConnection.pas, line
799)
:Idtcpconnection.TIdTCPConnection.Write (IdTCPConnection.pas, line 762)
:Frm_communicator.TfrmCommunicator.btnRefreshClick (frm_communicator.pas,
line 213)
procedure TfrmCommunicator.btnRefreshClick(Sender: TObject);
begin
if not IdTCPClient1.Connected then IdTCPClient1.Connect(10); //<= this is
line 213
IdTCPClient1.WriteLn('@' + 'CLIENTS:REQUEST');
end;
Restarting the server app fixes the problem, but does not explain why it
occured in the first place. I wrote this code probably 3 years ago, and am
now just getting arround to adding this functionallity to our main
application. I remember that I had the same problem back then, I just did
not have time to debug it. I am not very familliar with the Indy components,
any help would be greatly
appreciated.
tia...bwb