What you want to do is use the setsockopt call with the parameter SO_REUSEADDR as in setsockopt(s,SOL_SOCKET,SO_REUSEADDR,0,0); . This allows you to bypass the timeout condition you are experiencing. Jimmy Parrish