\Psc\Library\Net\Http\ServerResponse

响应实体

Summary

Methods
Properties
Constants
__construct()
setContent()
respond()
sendHeaders()
sendContent()
$stream
No constants found
No protected methods found
$body
N/A
done()
$done
N/A

Properties

$stream

$stream : \Psc\Core\Stream\SocketStream

Type

SocketStream

$body

$body : mixed

Type

mixed

$done

$done : \Closure

Type

\Closure

Methods

__construct()

__construct(\Psc\Core\Stream\SocketStream  $stream, \Closure  $done) : mixed

Parameters

\Psc\Core\Stream\SocketStream $stream
\Closure $done

Returns

mixed —

setContent()

setContent(mixed  $content, string|null  $contentType = null) : $this

Parameters

mixed $content
string|null $contentType

Returns

$this —

respond()

respond() : void

Throws

\Psc\Std\Stream\Exception\ConnectionException

sendHeaders()

sendHeaders(int|null  $statusCode = null) : $this

Parameters

int|null $statusCode

Throws

\Psc\Std\Stream\Exception\ConnectionException

Returns

$this —

sendContent()

sendContent() : $this

Throws

\Psc\Std\Stream\Exception\ConnectionException

Returns

$this —

done()

done() : void