\Psc\Library\Net\Http\ServerHttpServer

Http服务类

Summary

Methods
Properties
Constants
__construct()
listen()
onRequest()
$onRequest
No constants found
No protected methods found
No protected properties found
N/A
addClient()
$server
N/A

Properties

$onRequest

$onRequest : \Closure

请求处理器

Type

\Closure —

$server

$server : \Psc\Core\Stream\SocketStream

Type

SocketStream

Methods

__construct()

__construct(string  $address, mixed|null  $context = null) : mixed

Parameters

string $address
mixed|null $context

Returns

mixed —

listen()

listen() : void

onRequest()

onRequest(\Closure  $onRequest) : void

Parameters

\Closure $onRequest

addClient()

addClient(\Psc\Core\Stream\SocketStream  $stream) : void

Parameters

\Psc\Core\Stream\SocketStream $stream