EventHttp
final class EventHttp (View source)
EventHttp.
Represents HTTP server.
Methods
accept.
addServerAlias.
bind.
removeServerAlias.
setAllowedMethods.
setCallback.
setDefaultCallback.
setMaxBodySize.
setMaxHeadersSize.
setTimeout.
Details
__construct(EventBase $base, EventSslContext|null $ctx = null)
__construct.
Constructs EventHttp object(the HTTP server).
bool
accept(mixed $socket)
accept.
Makes an HTTP server accept connections on the specified socket stream or resource.
bool
addServerAlias(string $alias)
addServerAlias.
Adds a server alias to the HTTP server object.
bool
bind(string $address, int $port)
bind.
Binds an HTTP server on the specified address and port.
bool
removeServerAlias(string $alias)
removeServerAlias.
Removes server alias.
void
setAllowedMethods(int $methods)
setAllowedMethods.
Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks.
bool
setCallback(string $path, string $cb, string|null $arg = null)
setCallback.
Sets a callback for specified URI.
void
setDefaultCallback(string $cb, string|null $arg = null)
setDefaultCallback.
Sets default callback to handle requests that are not caught by specific callbacks.
void
setMaxBodySize(int $value)
setMaxBodySize.
Sets maximum request body size.
void
setMaxHeadersSize(int $value)
setMaxHeadersSize.
Sets maximum HTTP header size.
void
setTimeout(int $value)
setTimeout.
Sets the timeout for an HTTP request.