public function disconnect(): void
    {
        if ($this->socket) {
            stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
        }
        $this->socket = null;
        $this->connected = false;
    }
public function disconnect(): void
    {
        if ($this->socket) {
            stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);
        }
        $this->socket = null;
        $this->connected = false;
    }
public function disconnect ( ) : void { if ( $ this -> socket ) { stream_socket_shutdown ( $ this -> socket , STREAM_SHUT_RDWR ) ; } $ this -> socket = null ; $ this -> connected = false ; }
Disconnect the socket

@return void
Disconnect the socket