Archived

This topic is now archived and is closed to further replies.

connect() timeout

This topic is 5273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using TCP. When a client wants to search for server games, he tries to connect to all IPs of the LAN, using the connect() function. However, this function waits for the response od the server, but if the server doesn''t have a game created, the connect() function become too slow. I wanted to know if there''s a way to set the timeout to the connect() function, or if there''s another way to search for games created on the LAN.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you might want to lookup broadcasting ....

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
send a SYN packet to all the ips and just listen. if any ACKS come back, you can connect to their origins.

Share this post


Link to post
Share on other sites