| View previous topic :: View next topic |
| Author |
Message |
cheerio Guest
|
Posted: Tue Apr 27, 2004 3:17 pm Post subject: How to test if a service is listening on a specific port? |
|
|
(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
|
Posted: Tue Apr 27, 2004 3:46 pm Post subject: Re: How to test if a service is listening on a specific port |
|
|
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
|
Posted: Tue Apr 27, 2004 3:54 pm Post subject: Re: How to test if a service is listening on a specific port |
|
|
"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
|
Posted: Tue Apr 27, 2004 7:10 pm Post subject: Re: Thankya |
|
|
"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
|
Posted: Tue Apr 27, 2004 7:13 pm Post subject: Re: Thankya |
|
|
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 |
|
 |
|