CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    17

    Application hangs during gethostbyaddr and connect function

    Hi,

    I have created an SDI application in which i am creating a client-server application using Socket Programming.I am connecting with multiple PCs.My application works fine if the remote PC gets connected.But when the remote PC is ShutDown the application hangs during gethostbyaddr function and takes some time to come out of it.If my client application is not running in remote PCs then it gets hang during connect function.Can anybody please help me out of this or suggest a different way to do it.Its urgent.

    Thanks

  2. #2
    Join Date
    Feb 2005
    Posts
    2,160

    Re: Application hangs during gethostbyaddr and connect function

    Sounds like a resolver issue. Is there any reason why you need the hostname from the addr? Many resolvers don't even bother adding reverse lookup records since so many addresses are assigned from DHCP these days.

    Why are you calling gethostbyaddr at all after the connection is established?

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured