🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #5194

Closing TIDTCPServer

#5194
From: Alfred Thomas
Date: Thu, 30 Sep 2004 14:28
10 lines
1375 bytes
Hi All

I have a problem with TIdTCPServer. When disconnect I do IdTCPServer->Active = false; but this does not disconnect the clients and hangs. I want all the connected clients to be disconnected as soon as I set Active = false;
I also tried looping through the threads and calling the connection->DisconnectSocket(), but that only works while stepping through with the debugger and not when it runs.
I am using IDTCPServer in a service app and this causes the service to "hang" when stopping it.
Can anyone help?

Regards
Alfred Thomas  
Technical Details
Message-ID: <415c17fa$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ffbbfefff18a50d0,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Alfred Thomas" <alfred@fischerint.co.za>
Sender: "Alfred Thomas" <alfred@fischerint.co.za>
Reply-To: "Alfred Thomas" <alfred@fischerint.co.za>
Subject: Closing TIDTCPServer
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 196.25.217.126     
X-Forwarded-For: 192.96.150.202
NNTP-Posting-Host: 207.105.83.66
Message-ID: <415c17fa$1@newsgroups.borland.com>
Date: 30 Sep 2004 07:28:10 -0700
X-Trace: newsgroups.borland.com 1096554490 207.105.83.66 (30 Sep 2004 07:28:10 -0700)
Lines: 10
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail