View Single Post
Old 04-06-2006, 09:42 AM  
Syrinx
Junior Member
 
Join Date: Jun 2004
Posts: 25
Default Asynchronously use connect() API

socket DataSocket = socket(AF_INET,SOCK_STREAM,0);
WSAAsyncSelect(DataSocket, Window, WM_TCPDATASOCKET,FD_CONNECT|FD_READ|FD_WRITE|FD_CL OSE);
connect(DataSocket, (const SOCKADDR *)&ServerAddress,sizeof(ServerAddress));

normally,the default time out for connect() is over 10 seconds,any way I can control the time out at 5 seconds other than 10+ seconds.

Thx
Syrinx is offline