function destruct() { global $vp; if (is_object($vp) && isset($vp->Socket)) { Socket_shutdown($vp->Socket, 2); Socket_close($vp->Socket); unset($vp->Socket); } }
function Quit() { $out = "quit\n"; Socket_write($this->Socket, $out); Socket_shutdown($this->Socket, 2); Socket_close($this->Socket); unset($this->Socket); }