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 

resolving ftp.domain.com to IP adr

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





PostPosted: Fri Oct 24, 2003 11:59 pm    Post subject: resolving ftp.domain.com to IP adr Reply with quote



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





PostPosted: Sat Oct 25, 2003 12:14 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote




"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.

Quote:
is it the same way for www.domain.com and ftp.domain.com?

Yes.


Gambit



Back to top
AKZ
Guest





PostPosted: Sat Oct 25, 2003 1:45 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote



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





PostPosted: Sat Oct 25, 2003 1:53 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote


"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





PostPosted: Sat Oct 25, 2003 2:08 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote

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





PostPosted: Sat Oct 25, 2003 3:05 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote


"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





PostPosted: Sat Oct 25, 2003 3:18 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote


"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





PostPosted: Sat Oct 25, 2003 4:15 am    Post subject: Re: resolving ftp.domain.com to IP adr Reply with quote


"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
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.