Download the PHP package markkimsal/amphp-mqtt without Composer

On this page you can find all versions of the php package markkimsal/amphp-mqtt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package amphp-mqtt

MQTT

markkimsal/amphp-mqtt is an asynchronous MQTT client for PHP based on Amp.

Installation

This project does not require any PHP extensions.

Usage

Every publish or subscribe returns an Amp\Promise that you can react to when it's resolved. Messages are received from ->on('message') and that takes a callback with only 1 argument: the Packet\Publish class. Packet\Publish is used for both sending and receiving messages.

You can start sending and subscribing before the connection ack packet is received and the system will queue up your packets but still return a Amp\Promise immediately.

QoS 0 packets will resolve as soon as they are sent as they will not get any acknowledgement from the server.

QoS 1 packets will resolve when the client gets a Puback packet.

QoS 2 packets will resolve when the client gets a Pubcomp packet. The client will automatically respond to Pubrec with a Pubrel as per the spec.

Supports TLSv1.2 by using "tls://" prefix to the URI of the server. Peer verification is not done.

Supports username and password authentication as parameters of the connection URL.

Blocking mode (integration with sync code)

You can use this library in a synchronous backend to wait for sending packets with QoS 0,1, or 2.

Manual Publish Acking

You can control when you acknowlege publish messages of QoS 1 and 2 by disabling the auto-ack feature. Otherwise, the appropriate acknowledgement packets will be sent after the on('message') handler is run.

Clean Session

You can connect with a clean session by adding cleanSession as a URL parameter.

You MUST either use a clean session or supply a client ID.

If you do not supply a clientId a clean session is automatically created for you.


All versions of amphp-mqtt with dependencies

PHP Build Version
Package Version
Requires evenement/evenement Version ~3.0
amphp/amp Version ^2
amphp/socket Version ^0.10
amphp/uri Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package markkimsal/amphp-mqtt contains the following files

Loading the files please wait ....