An asynchronous HTTP client.
It allows you to make requests to HTTP servers, and a single client can make requests to any server.
It also allows you to open WebSockets to servers.
The client can also pool HTTP connections.
For pooling to occur, keep-alive must be true on the @see \io\vertx\jphp\core\http\HttpClientOptions (default is true). In this case connections will be pooled and re-used if there are pending HTTP requests waiting to get a connection, otherwise they will be closed.
This gives the benefits of keep alive when the client is loaded but means we don't keep connections hanging around unnecessarily when there would be no benefits anyway.
The client also supports pipe-lining of requests. Pipe-lining means another request is sent on the same connection before the response from the preceding one has returned. Pipe-lining is not appropriate for all requests.
To enable pipe-lining, it must be enabled on the @see \io\vertx\jphp\core\http\HttpClientOptions (default is false).
When pipe-lining is enabled the connection will be automatically closed when all in-flight responses have returned and there are no outstanding pending requests to write.
The client is designed to be reused between requests.
| package |
Default |
|---|
__construct()
close() : void
Clients should always be closed after use.
connectionHandler( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
delete( $arg0, $arg1 = null, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $options [RequestOptions | array] the request options delete($options)
Create an HTTP DELETE request to send to the server at the default host and port.
param $requestURI [string] the relative URI delete($requestURI)
Create an HTTP DELETE request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI delete($host, $requestURI)
Create an HTTP DELETE request to send to the server with the specified options, specifying a response handler to receive the response
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
delete($options, $responseHandler)
Create an HTTP DELETE request to send to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
delete($requestURI, $responseHandler)
Create an HTTP DELETE request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI delete($port, $host, $requestURI)
Create an HTTP DELETE request to send to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
delete($host, $requestURI, $responseHandler)
Create an HTTP DELETE request to send to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
delete($port, $host, $requestURI, $responseHandler)
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
deleteAbs( $arg0, $arg1 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $absoluteURI [string] the absolute URI deleteAbs($absoluteURI)
Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
deleteAbs($absoluteURI, $responseHandler)
string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
get( $arg0, $arg1 = null, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $options [RequestOptions | array] the request options get($options)
Create an HTTP GET request to send to the server at the default host and port.
param $requestURI [string] the relative URI get($requestURI)
Create an HTTP GET request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI get($host, $requestURI)
Create an HTTP GET request to send to the server with the specified options, specifying a response handler to receive the response
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
get($options, $responseHandler)
Create an HTTP GET request to send to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
get($requestURI, $responseHandler)
Create an HTTP GET request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI get($port, $host, $requestURI)
Create an HTTP GET request to send to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
get($host, $requestURI, $responseHandler)
Create an HTTP GET request to send to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
get($port, $host, $requestURI, $responseHandler)
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
getAbs( $arg0, $arg1 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $absoluteURI [string] the absolute URI getAbs($absoluteURI)
Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
getAbs($absoluteURI, $responseHandler)
string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
getNow( $arg0, $arg1, $arg2 = null, $arg3 = null) : $this
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
getNow($options, $responseHandler)
Sends an HTTP GET request to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
getNow($requestURI, $responseHandler)
Sends an HTTP GET request to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
getNow($host, $requestURI, $responseHandler)
Sends an HTTP GET request to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
getNow($port, $host, $requestURI, $responseHandler)
| deprecated |
|---|
string | RequestOptions | array | integer
callable | string
callable | string
callable
$thisa reference to this, so the API can be used fluently
head( $arg0, $arg1 = null, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $options [RequestOptions | array] the request options head($options)
Create an HTTP HEAD request to send to the server at the default host and port.
param $requestURI [string] the relative URI head($requestURI)
Create an HTTP HEAD request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI head($host, $requestURI)
Create an HTTP HEAD request to send to the server with the specified options, specifying a response handler to receive the response
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
head($options, $responseHandler)
Create an HTTP HEAD request to send to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
head($requestURI, $responseHandler)
Create an HTTP HEAD request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI head($port, $host, $requestURI)
Create an HTTP HEAD request to send to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
head($host, $requestURI, $responseHandler)
Create an HTTP HEAD request to send to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
head($port, $host, $requestURI, $responseHandler)
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
headAbs( $arg0, $arg1 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $absoluteURI [string] the absolute URI headAbs($absoluteURI)
Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
headAbs($absoluteURI, $responseHandler)
string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
headNow( $arg0, $arg1, $arg2 = null, $arg3 = null) : $this
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
headNow($options, $responseHandler)
Sends an HTTP HEAD request to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
headNow($requestURI, $responseHandler)
Sends an HTTP HEAD request to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
headNow($host, $requestURI, $responseHandler)
Sends an HTTP HEAD request to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
headNow($port, $host, $requestURI, $responseHandler)
| deprecated |
|---|
string | RequestOptions | array | integer
callable | string
callable | string
callable
$thisa reference to this, so the API can be used fluently
isMetricsEnabled() : boolean
boolean{@code true} if metrics are enabled
post( $arg0, $arg1 = null, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $options [RequestOptions | array] the request options post($options)
Create an HTTP POST request to send to the server at the default host and port.
param $requestURI [string] the relative URI post($requestURI)
Create an HTTP POST request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI post($host, $requestURI)
Create an HTTP POST request to send to the server with the specified options, specifying a response handler to receive the response
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
post($options, $responseHandler)
Create an HTTP POST request to send to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
post($requestURI, $responseHandler)
Create an HTTP POST request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI post($port, $host, $requestURI)
Create an HTTP POST request to send to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
post($host, $requestURI, $responseHandler)
Create an HTTP POST request to send to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
post($port, $host, $requestURI, $responseHandler)
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
postAbs( $arg0, $arg1 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $absoluteURI [string] the absolute URI postAbs($absoluteURI)
Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
postAbs($absoluteURI, $responseHandler)
string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
put( $arg0, $arg1 = null, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $options [RequestOptions | array] the request options put($options)
Create an HTTP PUT request to send to the server at the default host and port.
param $requestURI [string] the relative URI put($requestURI)
Create an HTTP PUT request to send to the server at the specified host and default port.
param $host [string] the host param $requestURI [string] the relative URI put($host, $requestURI)
Create an HTTP PUT request to send to the server with the specified options, specifying a response handler to receive the response
param $options [RequestOptions | array] the request options
param $responseHandler [callable] the response handler
this method is deprecated
put($options, $responseHandler)
Create an HTTP PUT request to send to the server at the default host and port, specifying a response handler to receive the response
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
put($requestURI, $responseHandler)
Create an HTTP PUT request to send to the server at the specified host and port.
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI put($port, $host, $requestURI)
Create an HTTP PUT request to send to the server at the specified host and default port, specifying a response handler to receive the response
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
put($host, $requestURI, $responseHandler)
Create an HTTP PUT request to send to the server at the specified host and port, specifying a response handler to receive the response
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
put($port, $host, $requestURI, $responseHandler)
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
putAbs( $arg0, $arg1 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $absoluteURI [string] the absolute URI putAbs($absoluteURI)
Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
putAbs($absoluteURI, $responseHandler)
string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
redirectHandler( $arg0) : $this
The redirect handler is called when a 3xx response is received and the request is configured to
follow redirects with @see \io\vertx\jphp\core\http\HttpClientRequest::setFollowRedirects.
The redirect handler is passed the @see \io\vertx\jphp\core\http\HttpClientResponse, it can return an @see \io\vertx\jphp\core\http\HttpClientRequest or null.
Future is returned, the client will send this new request
The handler must return a Future unsent so the client can further configure it and send it.
callable
$thisa reference to this, so the API can be used fluently
request( $arg0, $arg1, $arg2 = null, $arg3 = null, $arg4 = null, $arg5 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $method [string] the HTTP method param $options [RequestOptions | array] the request options request($method, $options)
Create an HTTP request to send to the server at the default host and port.
param $method [string] the HTTP method param $requestURI [string] the relative URI request($method, $requestURI)
Like @see \io\vertx\jphp\core\http\HttpClient::request using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the options parameter.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $options [RequestOptions | array]
request($method, $serverAddress, $options)
Create an HTTP request to send to the server at the specified host and default port.
param $method [string] the HTTP method
param $host [string] the host
param $requestURI [string] the relative URI
request($method, $host, $requestURI)
Create an HTTP request to send to the server with the specified options, specifying a response handler to receive
param $method [string] the HTTP method
param $options [RequestOptions | array] the request options
param $responseHandler [callable]
this method is deprecated
request($method, $options, $responseHandler)
Create an HTTP request to send to the server at the default host and port, specifying a response handler to receive
the response
param $method [string] the HTTP method
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
request($method, $requestURI, $responseHandler)
Create an HTTP request to send to the server at the specified host and port.
param $method [string] the HTTP method
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
request($method, $port, $host, $requestURI)
Like @see \io\vertx\jphp\core\http\HttpClient::request using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the options parameter.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $options [RequestOptions | array]
param $responseHandler [callable]
request($method, $serverAddress, $options, $responseHandler)
Create an HTTP request to send to the server at the specified host and default port, specifying a response handler to receive
the response
param $method [string] the HTTP method
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
request($method, $host, $requestURI, $responseHandler)
Like @see \io\vertx\jphp\core\http\HttpClient::request using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the host and port parameters.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $port [integer]
param $host [string]
param $requestURI [string]
request($method, $serverAddress, $port, $host, $requestURI)
Create an HTTP request to send to the server at the specified host and port, specifying a response handler to receive
the response
param $method [string] the HTTP method
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $responseHandler [callable] the response handler
this method is deprecated
request($method, $port, $host, $requestURI, $responseHandler)
Like @see \io\vertx\jphp\core\http\HttpClient::request using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the host and port parameters.
Use to connect to a unix domain socket server. param $method [string] param $serverAddress [SocketAddress] param $port [integer] param $host [string] param $requestURI [string] param $responseHandler [callable] request($method, $serverAddress, $port, $host, $requestURI, $responseHandler)
string
string | RequestOptions | array | integer | SocketAddress
callable | string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
requestAbs( $arg0, $arg1, $arg2 = null, $arg3 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $method [string] the HTTP method param $absoluteURI [string] the absolute URI requestAbs($method, $absoluteURI)
Like @see \io\vertx\jphp\core\http\HttpClient::requestAbs using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the absoluteURI parameter.
Use to connect to a unix domain socket server.
param $method [string]
param $serverAddress [SocketAddress]
param $absoluteURI [string]
requestAbs($method, $serverAddress, $absoluteURI)
Create an HTTP request to send to the server using an absolute URI, specifying a response handler to receive
the response
param $method [string] the HTTP method
param $absoluteURI [string] the absolute URI
param $responseHandler [callable] the response handler
this method is deprecated
requestAbs($method, $absoluteURI, $responseHandler)
Like @see \io\vertx\jphp\core\http\HttpClient::requestAbs using the serverAddress parameter to connect to the
server instead of the absoluteURI parameter.
The request host header will still be created from the absoluteURI parameter.
Use to connect to a unix domain socket server. param $method [string] param $serverAddress [SocketAddress] param $absoluteURI [string] param $responseHandler [callable] requestAbs($method, $serverAddress, $absoluteURI, $responseHandler)
string
string | SocketAddress
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequestan HTTP client request object
webSocket( $arg0, $arg1, $arg2 = null, $arg3 = null) : void
param $requestURI [string] the relative URI param $handler [callable] handler that will be called with the websocket when connected webSocket($requestURI, $handler)
Connect a WebSocket with the specified options.
param $options [WebSocketConnectOptions | array] the request options param $handler [callable] webSocket($options, $handler)
Connect a WebSocket to the host and relative request URI and default port
param $host [string] the host param $requestURI [string] the relative URI param $handler [callable] handler that will be called with the websocket when connected webSocket($host, $requestURI, $handler)
Connect a WebSocket to the specified port, host and relative request URI
param $port [integer] the port param $host [string] the host param $requestURI [string] the relative URI param $handler [callable] handler that will be called with the websocket when connected webSocket($port, $host, $requestURI, $handler)
string | array | integer | WebSocketConnectOptions
callable | string
callable | string
callable
webSocketAbs( $arg0, $arg1, $arg2, $arg3, $arg4) : void
string
MultiMap
string
array
callable
websocketStream( $arg0, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null, $arg5 = null) : \io\vertx\jphp\core\http\ReadStream<WebSocket>
param $options [RequestOptions | array] the request options
this method is deprecated
websocketStream($options)
Create a WebSocket stream at the relative request URI using the default host and port and the specified headers
param $requestURI [string] the relative URI
this method is deprecated
websocketStream($requestURI)
Create a WebSocket stream to the specified host, relative request URI and default port
param $host [string] the host
param $requestURI [string] the relative URI
this method is deprecated
websocketStream($host, $requestURI)
Create a WebSocket stream with the specified options, and with the specified headers
param $options [RequestOptions | array] the request options
param $headers [MultiMap] the headers
this method is deprecated
websocketStream($options, $headers)
Create a WebSocket stream at the relative request URI using the default host and port and the specified headers
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
this method is deprecated
websocketStream($requestURI, $headers)
Create a WebSocket stream to the specified port, host and relative request URI
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
this method is deprecated
websocketStream($port, $host, $requestURI)
Create a WebSocket stream to the specified host, relative request URI and default port and with the specified headers
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
this method is deprecated
websocketStream($host, $requestURI, $headers)
Create a WebSocket stream with the specified options, with the specified headers and using the specified version of WebSockets
param $options [RequestOptions | array] the request options
param $headers [MultiMap] the headers
param $version [string] the websocket version
this method is deprecated
websocketStream($options, $headers, $version)
Create a WebSocket stream at the relative request URI using the default host and port, the specified headers and the specified version of WebSockets
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
this method is deprecated
websocketStream($requestURI, $headers, $version)
Create a WebSocket stream to the specified port, host and relative request URI, and with the specified headers
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
this method is deprecated
websocketStream($port, $host, $requestURI, $headers)
Create a WebSocket stream with the specified options and with the specified headers and using the specified version of WebSockets
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
this method is deprecated
websocketStream($host, $requestURI, $headers, $version)
Create a WebSocket stream to the specified port, host and relative request URI, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols
param $options [RequestOptions | array] the request options
param $headers [MultiMap] the headers
param $version [string] the websocket version
param $subProtocols [string] the subprotocols to use
this method is deprecated
websocketStream($options, $headers, $version, $subProtocols)
Create a WebSocket stream at the relative request URI using the default host and port, the specified headers, the specified version of WebSockets and the specified sub protocols
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
param $subProtocols [string] the subprotocols
this method is deprecated
websocketStream($requestURI, $headers, $version, $subProtocols)
Create a WebSocket stream to the specified port, host and relative request URI, with the specified headers and using the specified version of WebSockets
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
this method is deprecated
websocketStream($port, $host, $requestURI, $headers, $version)
Create a WebSocket stream to the specified host, relative request URI and default port, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
param $subProtocols [string] the subprotocols to use
this method is deprecated
websocketStream($host, $requestURI, $headers, $version, $subProtocols)
Create a WebSocket stream to the specified port, host and relative request URI, with the specified headers, using the specified version of WebSockets, and the specified websocket sub protocols
param $port [integer] the port
param $host [string] the host
param $requestURI [string] the relative URI
param $headers [MultiMap] the headers
param $version [string] the websocket version
param $subProtocols [string] the subprotocols to use
this method is deprecated
websocketStream($port, $host, $requestURI, $headers, $version, $subProtocols)
| deprecated |
|---|
string | RequestOptions | array | integer
MultiMap | string
MultiMap | string
MultiMap | string
string
string
\io\vertx\jphp\core\http\ReadStreama stream emitting a WebSocket event when the client connection has been upgraded to a websocket
websocketStreamAbs( $arg0, $arg1, $arg2, $arg3) : \io\vertx\jphp\core\http\ReadStream<WebSocket>
| deprecated |
|---|
string
MultiMap
string
string
\io\vertx\jphp\core\http\ReadStreama stream emitting a WebSocket event when the client connection has been upgraded to a websocket