Problem With CSocket::Connect
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Problem With CSocket::Connect

  1. #1
    Join Date
    Sep 2008
    Posts
    69

    Problem With CSocket::Connect

    Dear All,

    I use Connect(IP,Port) function to connect with server from client. if server port is in Listen mode, Client Connects with server within 1 sec.

    Suppose if server not in Listen mode, but client try to connect with server. In Client, Control is waiting 10 to 15 sec on Connect("192.168.3.123",8686) function.

    Why Connect function takes that much time when server not in listen mode...any one know the reason. At the period of Connection I can't do any operation.(Eg: I can't do Posting msg to main frame , i can't operate menus, like a way work affects). how we avoid this.....i hope u will help.

    Thanks All!

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

    Re: Problem With CSocket::Connect

    Quote Originally Posted by sathyboopathiraja View Post
    ... At the period of Connection I can't do any operation.(Eg: I can't do Posting msg to main frame , i can't operate menus, like a way work affects). how we avoid this.....i hope u will help.
    Get rid of CSocket class and use CAsyncSocket instead!
    Victor Nijegorodov

  3. #3
    Join Date
    Sep 2008
    Posts
    69

    Re: Problem With CSocket::Connect

    Dear Victor,

    It Wotks fine... thax u for ur guidance..

    With regards,
    Boopathiraja.N

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center