tags:

views:

33

answers:

1

I was wondering if anyone knows a way to know when fsockopen times out? For instance if I set the timeout to 5 seconds, can I define a handler to do something if it hits that timeout connecting to my server?

thanks

A: 

From the man page:

If the value returned in errno is 0 and the function returned FALSE, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket.

wallyk