Solved

Easy Indy question ?

Posted on 2004-04-07
8
230 Views
Last Modified: 2010-04-05
Hi
what is the best way to close the server-app ( the clients are conneting with it ) with out show the message error .
I use tidtcpserver and tidtcpclient .
thanks
0
Comment
Question by:peruzzi
8 Comments
 
LVL 5

Accepted Solution

by:
delphized earned 50 total points
ID: 10781440
Normally the clients must disconnect first, so you could broadcast a command from the server and in the client program when you receive the close request you disconnect, then in the server program when all the client are disconnected you can close without errors
0
 

Author Comment

by:peruzzi
ID: 10781726
Hi
ok I will do that.....
But
how can I know if there are not any clients connected befor closeing my server ?
I can not close server befor know that all clients are not connected .

thanks
0
 
LVL 5

Expert Comment

by:delphized
ID: 10782516
you have to keep track of them when they connect as in the indy example named chat
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10785721

   When you send a message to the server to close, you can do 2 things :

  1) Set Active = False (this will disconnect you), but the server should process this, and after disconnect all client (even you) should terminate.
  2) MaxConnection = 1 - you will stay connected

  Georgi
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:peruzzi
ID: 10809198
when I close my application ( do server1.active:=false)
I see this message (terminate thread timeout)

what is the solution for this problem
0
 
LVL 3

Expert Comment

by:MarcG
ID: 10831275
Do you see this message only when running your prog from the IDE (debugging) or is ithis exception raising when the app is running 'normal'.
If it is only inside the IDE you can forget this exception. It is showing any exception when in debug mode, even if it is afterwards handled with a try except.
This happens for some indy components, but the exceptions are normally handled there so you only see them when debugging.
0
 

Author Comment

by:peruzzi
ID: 10840496
this exception raising when the app is running 'normal'
0
 

Author Comment

by:peruzzi
ID: 10912365
Hi guys
thanks for you all
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now