Swoole\Http\Response->end

Declaration

<?php
Swoole\Http\Response->end(string $data)

Parameters

data

HTTP response body

Return

Response

Description

Send a HTTP response body to HTTP client.

$response->end can only be called once.

If the client enables keepalive, the connection between the server and the client will maintained.

If the client doesn't enable keepalive, the connection between the server and the client will be closed.

Example

<?php
Swoole\Http\Response->end(string $data);