Cancel socketconnect

This is a discussion on Cancel socketconnect within the Networking/Device Communication forums, part of the General Programming Boards category; I'm trying to make a connect timeout, and i have implemented this by starting a timeout thread. This works well, ...

  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
    EOP
    EOP is offline
    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, 07: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, 01: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, 01:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21