+ /*
+ * All IPv4-based connections are non-blocking used by this program or
+ * else the PHP process will "hang" until a peer connects which is not
+ * what is wanted here. This means, that all connections will end with
+ * isConnected=FALSE here.
+ */
+ if (($hasTimedOut === FALSE) && ($socketError == SOCKET_EINPROGRESS)) {
+ // A "connection in progress" has not timed out. All fine.
+ $isConnected = TRUE;
+
+ // Clear error
+ socket_clear_error($socketResource);
+ } // END - if
+