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