EventHttpConnection
class EventHttpConnection (View source)
EventHttpConnection.
Represents an HTTP connection.
Methods
__construct.
getBase.
getPeer.
setCloseCallback.
setLocalAddress.
setLocalPort.
setMaxBodySize.
setMaxHeadersSize.
setRetries.
setTimeout.
Details
__construct(EventBase $base, EventDnsBase $dns_base, string $address, int $port, EventSslContext|null $ctx = null)
__construct.
Constructs EventHttpConnection object.
false|EventBase
getBase()
getBase.
Returns event base associated with the connection.
void
getPeer(string $address, int $port)
getPeer.
Gets the remote address and port associated with the connection.
bool
makeRequest(EventHttpRequest $req, int $type, string $uri)
makeRequest.
Makes an HTTP request over the specified connection.
void
setCloseCallback(callable $callback, mixed $data = null)
setCloseCallback.
Set callback for connection close.
void
setLocalAddress(string $address)
setLocalAddress.
Sets the IP address from which HTTP connections are made.
void
setLocalPort(int $port)
setLocalPort.
Sets the local port from which connections are made.
void
setMaxBodySize(string $max_size)
setMaxBodySize.
Sets maximum body size for the connection.
void
setMaxHeadersSize(string $max_size)
setMaxHeadersSize.
Sets maximum header size.
void
setRetries(int $retries)
setRetries.
Sets the retry limit for the connection.
void
setTimeout(int $timeout)
setTimeout.
Sets the timeout for the connection.