BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to test if a service is listening on a specific port?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
cheerio
Guest





PostPosted: Tue Apr 27, 2004 3:17 pm    Post subject: How to test if a service is listening on a specific port? Reply with quote



(using Delphi6 Indy 9.0.14)

I've found out that TIdICMPClient is only usefull for doing a host ping.

But how can I do a service ping?

Currently I am using TIdTCPClient to open a connection followed by a quick
disconnect. Is there an other way, more efficient way to do this?


TIA,

cheerio

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Back to top
Martin James
Guest





PostPosted: Tue Apr 27, 2004 3:46 pm    Post subject: Re: How to test if a service is listening on a specific port Reply with quote




But how can I do a service ping?

Currently I am using TIdTCPClient to open a connection followed by a quick
disconnect. Is there an other way, more efficient way to do this?

Not really. It's not particularly inefficient. Some small packets are
exchanged in the TCP connect protocol & the app waits while this occurs. Is
the connect/disconnect time that's a problem? Do you have to check a lot of
servers? If so, you should issue lots of connect requests at once.

Rgds,
Martin


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Apr 27, 2004 3:54 pm    Post subject: Re: How to test if a service is listening on a specific port Reply with quote




"cheerio" <no.cheerio (AT) no (DOT) yahoo.com> wrote


Quote:
But how can I do a service ping?

The only way is to actually attempt a connection to the desired port and see
if it succeeds or fails.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Apr 27, 2004 7:10 pm    Post subject: Re: Thankya Reply with quote


"cheerio" <no.cheerio (AT) no (DOT) yahoo.com> wrote


Quote:
I got it, TIdTCPClient, it works for this purpose.

If all you are doing is essentially port scanning, I would recomment using
the sockt API directly. Then you can avoid the overhead of the VCL slowing
down your results.


Gambit



Back to top
cheerio
Guest





PostPosted: Tue Apr 27, 2004 7:13 pm    Post subject: Re: Thankya Reply with quote

Re: How to test if a service is listening on a specific port?
On Tue, 27 Apr 2004 08:54:50 -0700, Remy Lebeau (TeamB)
<gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote:
Quote:
The only way is to actually attempt a connection to the desired port and
see
if it succeeds or fails.

I got it, TIdTCPClient, it works for this purpose.


Gambit - Thanks.

cheerio

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.