Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Nov : TidTCPServer/Client Properly closing connections
| Subject: | TidTCPServer/Client Properly closing connections |
| Posted by: | "Oleg Toplionkin" (toplionk..@ichronos.info) |
| Date: | Wed, 15 Nov 2006 14:03:29 |
Hi 2 all.
I'm a newborn Indy user. Please help me with a solution to the problem: How
to properly close indy connections?
Problem is when client exits from program: Server gets an "EOSError at
*****" System Error code 5. Access is denied and crashes.
I'm using the following methoths.
---------------------------------
OnClient:
a thread is spawned to Connect and ReadLn data.
while client.connected do begin
***.readln;
process;
end;
When disconnecting:
Client.Disconnect;
----------------------------------
OnServer: a new fast execution thread is spawned for each client request in
OnExecute;
What am I doing wrong?
Thank you,
Oleg.