X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=Uplink%2FClient.class.php;h=c7ecc4cf40440bf942ccac22cd9d0003288a8510;hb=642e5fa114096506072cbc9ef6f16e31eecd7abf;hp=834448c4ba362fdd67c0b87d328a93b83119e2e0;hpb=d50b17d7f0ebc21c1c70f2ba513e0973ce9fc789;p=PHP-P10.git diff --git a/Uplink/Client.class.php b/Uplink/Client.class.php index 834448c..c7ecc4c 100644 --- a/Uplink/Client.class.php +++ b/Uplink/Client.class.php @@ -30,6 +30,9 @@ * 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) * @@ -72,6 +75,12 @@ class Client { 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);