public function closeSocket()
    {
        if (is_resource($this->resource)) {
            fclose($this->resource);
            $this->resource = null;
        }
    }
public function closeSocket()
    {
        if (is_resource($this->resource)) {
            fclose($this->resource);
            $this->resource = null;
        }
    }
public function closeSocket ( ) { if ( is_resource ( $ this -> resource ) ) { fclose ( $ this -> resource ) ; $ this -> resource = null ; } }
Close socket, if open
Close socket if open