HOW TO USE: TIDTCPCLIENT1.CheckForDisconnect() and TIDTCPCLIENT1.CheckResponse()

Posted on 2006-07-04
Medium Priority
Last Modified: 2012-05-05
how to use this functions below, somebody can give a example:

Question by:rafaelrgl
1 Comment
LVL 17

Accepted Solution

TheRealLoki earned 2000 total points
ID: 17039701
is used internally in the "Connected" property (and therfore also in the "Disconnect" method)
and various "Read" methods.
You do not need to call this yourself.

Determines if the peer has been gracefully disconnected
it calls ReadFromStack with a very short timeout, which subsequently validates the connection.
It is safe to call this before a Read, but you can still get a disconnect while receiving data
  S := IdTCPClient1.ReadLn;

this could return the following exceptions
  on EIdConnClosedGracefully do // connection closed gracefully
  on EIdNotConnected: // not connected....

  this just looks to see if 1 smallint is in an array of allowed smallints
e.g. if "2" is in [0,1,3,4,5]
I've only ever seen this used internally by Indy, but it's a compact function that you could use for your own purposes, although I don't see any obvious place in the Indy stuff I do.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
To export Lotus Notes to Outlook PST or Exchange and Domino Server files to Exchange Server or PST files with ease, go for Kernel for Lotus Notes to Outlook conversion tool. Through the video, you can watch the conversion process. A common user with…
Suggested Courses

600 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