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
$this
a 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\HttpClientRequest
an 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\HttpClientRequest
an 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\HttpClientRequest
an 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\HttpClientRequest
an 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
$this
a 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\HttpClientRequest
an 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\HttpClientRequest
an 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
$this
a 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\HttpClientRequest
an 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\HttpClientRequest
an 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\HttpClientRequest
an 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\HttpClientRequest
an 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
$this
a reference to this, so the API can be used fluently
request( $arg0, $arg1, $arg2 = null, $arg3 = null, $arg4 = 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)
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)
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)
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)
string
string | RequestOptions | array | integer
callable | string
callable | string
callable
\io\vertx\jphp\core\http\HttpClientRequest
an HTTP client request object
requestAbs( $arg0, $arg1, $arg2 = null) : \io\vertx\jphp\core\http\HttpClientRequest
param $method [string] the HTTP method param $absoluteURI [string] the absolute URI requestAbs($method, $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)
string
string
callable
\io\vertx\jphp\core\http\HttpClientRequest
an HTTP client request object
websocket( $arg0, $arg1, $arg2 = null, $arg3 = null, $arg4 = null, $arg5 = null, $arg6 = null, $arg7 = null) : $this
param $options [RequestOptions | array] the request options param $wsConnect [callable] handler that will be called with the websocket when connected websocket($options, $wsConnect)
Connect a WebSocket at the relative request URI using the default host and port
param $requestURI [string] the relative URI param $wsConnect [callable] handler that will be called with the websocket when connected websocket($requestURI, $wsConnect)
Connect a WebSocket with the specified options
param $options [RequestOptions | array] the request options param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($options, $wsConnect, $failureHandler)
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 $wsConnect [callable] handler that will be called with the websocket when connected websocket($host, $requestURI, $wsConnect)
Connect a WebSocket with the specified options, and with the specified headers
param $options [RequestOptions | array] the request options param $headers [MultiMap] the headers param $wsConnect [callable] handler that will be called with the websocket when connected websocket($options, $headers, $wsConnect)
Connect a WebSocket at the relative request URI using the default host and port
param $requestURI [string] the relative URI param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($requestURI, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($requestURI, $headers, $wsConnect)
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 $wsConnect [callable] handler that will be called with the websocket when connected websocket($port, $host, $requestURI, $wsConnect)
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 $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($host, $requestURI, $wsConnect, $failureHandler)
Connect a WebSocket with the specified options, and with the specified headers
param $options [RequestOptions | array] the request options param $headers [MultiMap] the headers param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($options, $headers, $wsConnect, $failureHandler)
Connect a WebSocket to the specified host,relative request UR, and default port and with the specified headers
param $host [string] the host param $requestURI [string] the relative URI param $headers [MultiMap] the headers param $wsConnect [callable] handler that will be called with the websocket when connected websocket($host, $requestURI, $headers, $wsConnect)
Connect a WebSocket with the specified optionsI, 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($options, $headers, $version, $wsConnect)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($requestURI, $headers, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($requestURI, $headers, $version, $wsConnect)
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 $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($port, $host, $requestURI, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($port, $host, $requestURI, $headers, $wsConnect)
Connect a WebSocket to the specified host,relative request UR, and default port and with the specified headers
param $host [string] the host param $requestURI [string] the relative URI param $headers [MultiMap] the headers param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($host, $requestURI, $headers, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($options, $headers, $version, $wsConnect, $failureHandler)
Connect a WebSocket to the specified host, relative request URI and default port 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($host, $requestURI, $headers, $version, $wsConnect)
Connect a WebSocket with the specified options, 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($options, $headers, $version, $subProtocols, $wsConnect)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($requestURI, $headers, $version, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($requestURI, $headers, $version, $subProtocols, $wsConnect)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($port, $host, $requestURI, $headers, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($port, $host, $requestURI, $headers, $version, $wsConnect)
Connect a WebSocket to the specified host, relative request URI and default port 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($host, $requestURI, $headers, $version, $wsConnect, $failureHandler)
Connect a WebSocket with the specified options, 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($options, $headers, $version, $subProtocols, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($host, $requestURI, $headers, $version, $subProtocols, $wsConnect)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($requestURI, $headers, $version, $subProtocols, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($port, $host, $requestURI, $headers, $version, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected websocket($port, $host, $requestURI, $headers, $version, $subProtocols, $wsConnect)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($host, $requestURI, $headers, $version, $subProtocols, $wsConnect, $failureHandler)
Connect a WebSocket 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 param $wsConnect [callable] handler that will be called with the websocket when connected param $failureHandler [callable] handler that will be called if websocket connection fails websocket($port, $host, $requestURI, $headers, $version, $subProtocols, $wsConnect, $failureHandler)
string | RequestOptions | array | integer
MultiMap | callable | string
MultiMap | callable | string
MultiMap | callable | string
callable | string
callable | string
callable
callable
$this
a reference to this, so the API can be used fluently
websocketAbs( $arg0, $arg1, $arg2, $arg3, $arg4, $arg5) : $this
string
MultiMap
string
string
callable
callable
$this
a reference to this, so the API can be used fluently
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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 websocketStream($port, $host, $requestURI, $headers, $version, $subProtocols)
string | RequestOptions | array | integer
MultiMap | string
MultiMap | string
MultiMap | string
string
string
\io\vertx\jphp\core\http\ReadStream
a 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>
string
MultiMap
string
string
\io\vertx\jphp\core\http\ReadStream
a stream emitting a WebSocket event when the client connection has been upgraded to a websocket