An MQTT server <p> You can accept incoming MQTT connection requests providing a @see \io\vertx\jphp\mqtt\MqttServer::endpointHandler. As the requests arrive, the handler will be called with an instance of @see \io\vertx\jphp\mqtt\MqttEndpoint in order to manage the communication with the remote MQTT client.
package |
Default |
---|
__construct()
actualPort() : integer
integer
the actual port the server is listening on.
close( $arg0 = null) : void
The close happens asynchronously and the server may not be closed until some time after the call has returned. close() Close the server supplying an handler that will be called when the server is actually closed (or has failed). param $completionHandler [callable] the handler called on completion close($completionHandler)
callable
create( $arg0, $arg1 = null) : \io\vertx\jphp\mqtt\MqttServer
param $vertx [Vertx] Vert.x instance create($vertx)
Return an MQTT server instance
param $vertx [Vertx] Vert.x instance param $options [MqttServerOptions | array] MQTT server options create($vertx, $options)
Vertx
array | MqttServerOptions
\io\vertx\jphp\mqtt\MqttServer
MQTT server instance
endpointHandler( $arg0) : $this
callable
$this
a reference to this, so the API can be used fluently
exceptionHandler( $arg0) : $this
callable
$this
a reference to this, so the API can be used fluently
listen( $arg0 = null, $arg1 = null, $arg2 = null) : $this
listen()
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor
param $port [integer] the port to listen on listen($port)
Start the server listening for incoming connections using the specified options through the constructor
param $listenHandler [callable] handler called when the asynchronous listen call ends listen($listenHandler)
Start the server listening for incoming connections on the port and host specified
param $port [integer] the port to listen on param $host [string] the host to listen on listen($port, $host)
Start the server listening for incoming connections on the port specified but on "0.0.0.0" as host. It ignores any options specified through the constructor
param $port [integer] the port to listen on param $listenHandler [callable] handler called when the asynchronous listen call ends listen($port, $listenHandler)
Start the server listening for incoming connections on the port and host specified It ignores any options specified through the constructor
param $port [integer] the port to listen on param $host [string] the host to listen on param $listenHandler [callable] handler called when the asynchronous listen call ends listen($port, $host, $listenHandler)
callable | integer
callable | string
callable
$this
a reference to this, so the API can be used fluently