×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    229

    Question RHostResolver problem:resolve DNS successfuly,but cannot connect ip

    Hi,
    Everyone!

    I use "RHostResolver" to get the ip,but I cannot connect the ip:

    Code:
    RHostResolver DNSResolver;
    	
    	User::LeaveIfError( DNSResolver.Open( iSocketServ, KAfInet, KProtocolInetTcp ) );
    	
    	TRequestStatus status = KRequestPending;
    	
    	TNameEntry entry;
    	DNSResolver.GetByName( aDomain, entry, status );
    	User::LeaveIfError( status.Int() );
    	
    	DNSResolver.Close();
    	
    	TInetAddr addr = entry().iAddr;
    
    	addr.SetPort( aPort );
    	
    	iSocket.Connect( addr, status );
    	
    	status = KRequestPending;
    	User::WaitForRequest( status );//the app is still pending at this line
    	User::LeaveIfError( status.Int() );
    The "RHostResolver" resolve DNS successfully,but use "RSocket" to connect ip,the app is still pending.
    Why?Please give me a hand,thanks a lot!

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,699

    Re: RHostResolver problem:resolve DNS successfuly,but cannot connect ip

    You should not set status to anything. And especially not after passing it to an asynchronous service, like RSocket::Connect.

Similar Threads

  1. How to configure DNS server IP in nokia mobile
    By rajarao.ch in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-04-14, 12:12
  2. Replies: 7
    Last Post: 2009-03-21, 18:54
  3. Cannot connect to a NAT'ed IP From Device
    By deepanjanghosh16 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2006-12-26, 04:27
  4. DNS Error with IP adress and HTTP client
    By Tsht in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-07-20, 13:36
  5. Help! Help! My IP address is changing like crazy !!
    By jwynn_in_nh in forum Mobile Java General
    Replies: 0
    Last Post: 2003-07-22, 22:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×