I am using socket programming to connect to the TCP/IP server using c++.
when user selects an invalid IP address of TCP/IP server. The connect() API takes so much time.
I want my application <small></small>to wait for the response from that API for specific time. If no response comes in that specific period. My application should not try more for connecting to that IP address.
Please suggest me some ways to achieve this.