🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages Started by SKLIM Mon, 26 Nov 2007 09:05
EidClosedSocket with message 'Disconnected'
#738
Author: SKLIM
Date: Mon, 26 Nov 2007 09:05
13 lines
1344 bytes
Hi all,

I am using Indy 9.0.4. Currently I am working on TCPServer and facing problem to disconnect all connected client.

"EidClosedSocket with message 'Disconnected'" exception will show when I try to disconnect all connected client and set active to false or delete object.

tcpServer->Bindings->Items[0]->CloseSocket();
tcpServer->Active = false;

Any suggestion to gracefully disconnect all connected clients?

Thanks.
Re: EidClosedSocket with message 'Disconnected'
#739
Author: Remy Lebeau (TeamB)
Date: Mon, 26 Nov 2007 17:35
20 lines
1762 bytes
"SKLIM" <sklim82@hotmail.com> wrote in message 
news:474a9a54$1@newsgroups.borland.com...

> I am using Indy 9.0.4. Currently I am working on TCPServer and
> facing problem to disconnect all connected client.

That is because you are disconnecting them wrong.  You are closing the 
Binding itself, not the clients that are connected to it.  You would have to 
loop through the entries in the server's ActiveThreads list, calling 
DisconnectSocket() on each one individually.

> Any suggestion to gracefully disconnect all connected clients?

You should not be disconnecting them manually to begin with.  Setting the 
Active property to false by itself will internally disconnect all active 
clients for you.


Gambit 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads