Solved

Easy Indy question ?

Posted on 2004-04-07
8
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month6 days, 12 hours left to enroll

636 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