Laravoole\Wrapper\SwooleWebSocketWrapper::endResponse PHP Method

endResponse() public method

public endResponse ( $response, $content )
    public function endResponse($response, $content)
    {
        if (isset($response->request)) {
            // This is a websocket request
            $data = $this->connections[$response->request->fd]['protocol']::encode($response->http_status, $response->request->method, $content, $response->request->echo);
            $this->server->push($response->request->fd, $data);
        } else {
            // This is a http request
            parent::endResponse($response, $content);
        }
    }