From d71b9c1483d0c60f7de8235ae7cbd7b08827637a Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 6 Nov 2015 23:02:19 +0100 Subject: [PATCH] Fix toc and add missing documents --- docs/index.rst | 9 +++------ docs/references/broker.rst | 4 ++++ docs/references/index.rst | 7 +++++-- docs/references/mqttclient.rst | 4 ++++ hbmqtt/broker.py | 3 --- 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 docs/references/broker.rst create mode 100644 docs/references/mqttclient.rst diff --git a/docs/index.rst b/docs/index.rst index 0b6e31f..16cfb29 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -44,14 +44,11 @@ Once you have a environment setup and ready, HBMQTT can be installed with the fo User guide ---------- -If you need HBMQTT for running a MQTT client or deploying a MQTT broker, the :doc:`quickstart` describes how to use -console scripts provided by HBMQTT. +If you need HBMQTT for running a MQTT client or deploying a MQTT broker, the :doc:`quickstart` describes how to use console scripts provided by HBMQTT. -If you want to develop an application which needs to connect to a MQTT broker, the :doc:`client` reference documentation - explains how to use HBMQTT API for connecting, publishing and subscribing with a MQTT broker. +If you want to develop an application which needs to connect to a MQTT broker, the :doc:`references/mqttclient` documentation explains how to use HBMQTT API for connecting, publishing and subscribing with a MQTT broker. -If you want to run you own MQTT broker, th :doc:`broker` reference documentation explains how to embed a MQTT broker -inside a Python application. +If you want to run you own MQTT broker, th :doc:`references/broker` reference documentation explains how to embed a MQTT broker inside a Python application. News and updates are listed in the :doc:`changelog`. diff --git a/docs/references/broker.rst b/docs/references/broker.rst new file mode 100644 index 0000000..164daa3 --- /dev/null +++ b/docs/references/broker.rst @@ -0,0 +1,4 @@ +Broker API reference +==================== + +TBD \ No newline at end of file diff --git a/docs/references/index.rst b/docs/references/index.rst index f4731ef..4d1a5d4 100644 --- a/docs/references/index.rst +++ b/docs/references/index.rst @@ -13,6 +13,9 @@ Console scripts Programming API --------------- +* :doc:`mqttclient` : MQTT client API reference +* :doc:`broker` : MQTT broker API reference + TBD .. toctree:: @@ -21,5 +24,5 @@ TBD hbmqtt_pub hbmqtt_sub hbmqtt - - + mqttclient + broker diff --git a/docs/references/mqttclient.rst b/docs/references/mqttclient.rst new file mode 100644 index 0000000..3626b10 --- /dev/null +++ b/docs/references/mqttclient.rst @@ -0,0 +1,4 @@ +MQTTClient API reference +======================== + +TBD \ No newline at end of file diff --git a/hbmqtt/broker.py b/hbmqtt/broker.py index 15e48fe..bc4284e 100644 --- a/hbmqtt/broker.py +++ b/hbmqtt/broker.py @@ -30,7 +30,6 @@ from .plugins.manager import PluginManager, BaseContext _defaults = { 'timeout-disconnect-delay': 2, - 'publish-retry-delay': 5, 'auth': { 'allow-anonymous': True, 'password-file': None @@ -166,7 +165,6 @@ class Broker: bind: 0.0.0.0:8080 type: ws timeout-disconnect-delay: 2 - publish-retry-delay: 5 auth: plugins: ['auth.anonymous'] #List of plugins to activate for authentication among all registered plugins allow-anonymous: true / false @@ -380,7 +378,6 @@ class Broker: if client_session.keep_alive > 0: client_session.keep_alive += self.config['timeout-disconnect-delay'] self.logger.debug("Keep-alive timeout=%d" % client_session.keep_alive) - client_session.publish_retry_delay = self.config['publish-retry-delay'] handler.attach(client_session, reader, writer) self._sessions[client_session.client_id] = (client_session, handler)