* bool connect(String $host, int $port, String $bind = null, bool $ssl = false, int $blocking = 0)
* connects the socket to $host:$port with the provided options
*
+ * void disconnect()
+ * disconnects the socket
+ *
* bool connected()
* returns the state of the socket (true if the socket is connected with the server)
*
return false;
}
+ public function disconnect() {
+ if($this->socket == null) return;
+ fclose($this->socket);
+ $this->socket = null;
+ }
+
public function connected() {
if($this->socket == null) return false;
$read = array($this->socket);