Thread: Cancel socketconnect

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    329

    Cancel socketconnect

    I'm trying to make a connect timeout, and i have implemented this by starting a timeout thread. This works well, but throws an exception.
    How can i terminate the connection attempt, and return SOCKET_ERROR?

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    45
    Quote Originally Posted by knutso View Post
    I'm trying to make a connect timeout, and i have implemented this by starting a timeout thread. This works well, but throws an exception.
    How can i terminate the connection attempt, and return SOCKET_ERROR?
    shutdown, closesocket

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    329
    Solved my problem, thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cancel a DLL call
    By ryan_germain in forum Windows Programming
    Replies: 10
    Last Post: 08-08-2006, 06:48 AM
  2. GetOpenFileName: tell if the user pressed cancel
    By SwiftOutlaw in forum Windows Programming
    Replies: 1
    Last Post: 11-11-2004, 03:48 PM
  3. Cancel Button not working
    By Xzyx987X in forum Windows Programming
    Replies: 3
    Last Post: 10-27-2004, 12:41 AM
  4. Preventing Cancel?
    By JoeCoder in forum Windows Programming
    Replies: 3
    Last Post: 01-18-2004, 03:16 PM
  5. Cancel WaitCommEvent on win2k?
    By yoxler in forum Windows Programming
    Replies: 0
    Last Post: 05-08-2003, 12:34 AM