| View previous topic :: View next topic |
| Author |
Message |
AKZ Guest
|
Posted: Fri Oct 24, 2003 11:59 pm Post subject: resolving ftp.domain.com to IP adr |
|
|
how can i resolve some adr, for example ftp.domain.com and to get its IP
adr? is it the same way for www.domain.com and ftp.domain.com?
thanks.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Oct 25, 2003 12:14 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
"AKZ" <kzdown (AT) freemail (DOT) com.mk> wrote
| Quote: | how can i resolve some adr, for example ftp.domain.com and
to get its IP adr?
|
By performing a DNS query, such as with Indy's TIdDNSResolver component.
Yes.
Gambit
|
|
| Back to top |
|
 |
AKZ Guest
|
Posted: Sat Oct 25, 2003 1:45 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
here are component properties:
Name := 'IdDNSResolver1';
OnStatus := IdDNSResolver1Status;
Active := True;
Port := 53;
QueryRecords := [qtA];
and i try to call
IdDNSResolver1.Resolve('www.cnn.com');
but i got error :
Socket error: #10054
Connection reset by peer
what im doing wrong?
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Oct 25, 2003 1:53 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
"AKZ" <kzdown (AT) freemail (DOT) com.mk> wrote
| Quote: | here are component properties:
|
It looks like you did not set the Host property to the particular DNS server
that you want to use for performing the query with. The DNS system is not
some magical system that just happens to work whenever you call Resolve()
alone. It is a client/server system like any other, and as such you need to
specify the server that your TIdDNSResolver client is going to connect to.
Gambit
|
|
| Back to top |
|
 |
AKZ Guest
|
Posted: Sat Oct 25, 2003 2:08 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
| Quote: | It looks like you did not set the Host property to the particular DNS
server
that you want to use for performing the query with.
|
can i set any DNS server address?
i tryed with some but nothing happens.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Oct 25, 2003 3:05 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
"AKZ" <kzdown (AT) freemail (DOT) com.mk> wrote
| Quote: | can i set any DNS server address?
|
Yes, though typically you would want to use a DNS server that belongs to the
ISP which the internet connection is conected to.
Gambit
|
|
| Back to top |
|
 |
AKZ Guest
|
Posted: Sat Oct 25, 2003 3:18 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote
| Quote: |
"AKZ" <kzdown (AT) freemail (DOT) com.mk> wrote in message
news:3f99d5b7 (AT) newsgroups (DOT) borland.com...
here are component properties:
It looks like you did not set the Host property to the particular DNS
server
that you want to use for performing the query with. The DNS system is not
some magical system that just happens to work whenever you call Resolve()
alone. It is a client/server system like any other, and as such you need
to
specify the server that your TIdDNSResolver client is going to connect to.
|
When i try to connect to some ftp server i get following status msgs
appears..
Resolving hostname domain.com.
Connecting to xxx.xxx.xxx.xxx
Connected.
so i wonder how ftp client component knows to resolve this without any DNS?
can i use somehow FTPClient compoent to resolve domain name?
thanks.
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Oct 25, 2003 4:15 am Post subject: Re: resolving ftp.domain.com to IP adr |
|
|
"AKZ" <kzdown (AT) freemail (DOT) com.mk> wrote
| Quote: | so i wonder how ftp client component knows to
resolve this without any DNS?
|
It does use DNS. That is why the first status message says "resolving". It
is simply making a request to WinSock and letting WinSock handle the
resolving internally. WinSock has a gethostbyname() function for that
purpose. WinSock internally is probably just looking up the local network
adapter configurations to see which DNS servers are assigned to each adapter
(if any) so that it knows where to make its DNS requests to.
| Quote: | can i use somehow FTPClient compoent to resolve domain name?
|
TIdFTP uses DNS resolution, as do every other component in every other
socket library.
Gambit
|
|
| Back to top |
|
 |
|