Свойство | Тип | Описание | |
---|---|---|---|
$body | |||
$expect | request header has been seen | ||
$headers | headers and body | ||
$ip | |||
$method | |||
$multipart | header already seen | ||
$path | |||
$port | |||
$query | |||
$recvd_body_len | |||
$resource | |||
$sock | peer identifier | ||
$version | request line |
Метод | Описание | |
---|---|---|
__construct ( $sock, $addr ) | ||
__destruct ( ) | ||
closed ( $event, $args ) | ||
handle_invalid_state ( $r ) | ||
headers_received ( $event, $args ) | headers and may be body received | |
maybe_headers_received ( $event, $args ) | ||
setup ( $event, $args ) | ||
state ( ) | ||
wait_for_body ( $event, $args ) | ||
wait_for_headers ( $event, $args ) | ||
wait_for_request_line ( $event, $args ) |
Метод | Описание | |
---|---|---|
handle_shortcut ( $event, $args ) | shortcut handler | |
send_body ( $body ) | ||
send_header ( $k, $v ) | ||
send_headers ( $code, $headers ) | ||
send_line ( $code ) | ||
send_response ( $code, array $headers = [], $body = null ) | ||
set_header ( $k, $v ) | called internally for every header received |
Метод | Описание | |
---|---|---|
close ( ) | ||
line ( $method, $resource, $version ) | initializes status line elements | |
parse_shortcut_args ( $args ) | ||
read ( ) | ||
send ( $raw ) |
public headers_received ( $event, $args ) |
protected send_response ( $code, array $headers = [], $body = null ) | ||
$headers | array |
protected set_header ( $k, $v ) |