aboutsummaryrefslogtreecommitdiff
path: root/src/client.c
AgeCommit message (Collapse)Author
2018-01-16Fix keepalive handlingOskari Timperi
Previously the code would send pings only when SocketSelect() would timeout. This was not working when a client was subscribed to a topic and would receive periodic messages but wouldn't itself send anything. This meant that SocketSelect() wouldn't timeout at any point and we wouldn't execute the check for sending a PINGREQ. The fix is to do the check for last sent packet before calling SocketSelect() so that if we haven't been sending anything for a while, we really send the PINGREQ. Fixes #10
2017-03-18Fix publish message serializationOskari Timperi
All of the publish messages regardless of qos contained the message id.
2017-03-18Modify the code to use nonblocking socketsOskari Timperi
2017-03-06Free userName and password in MqttClientFree()Oskari Timperi
2017-03-06Massive refactoring of the internalsOskari Timperi
2017-02-20Support for username and passwordOskari Timperi
2017-02-19Add MqttClientSubscribeMany() and make necessary API changesOskari Timperi
2017-02-19Add private APIs to support interop testingOskari Timperi
2017-02-19Support reconnecting in MqttClientConnect()Oskari Timperi
2017-02-19Use keepalive as SocketSelect() timeout if timeout<0Oskari Timperi
2017-02-19Allow keepalive to be 0 to disable sending PINGREQsOskari Timperi
2017-02-18Disconnect socket if connected in MqttClientFree()Oskari Timperi
2017-02-18Fix a bug MqttClientHandlePubRel()Oskari Timperi
We wanted to find previous PUBREC messages in the function, but there was a typo so we were searching for PUBLISH messages. This made the client stop as it thought it received an unknown PUBREL.
2017-02-18Add MqttClientIsConnected()Oskari Timperi
2017-02-18Add timeout param to MqttClientRunOnce()Oskari Timperi
Also change SocketSelect() to take timeout in milliseconds.
2017-02-18Move cleanSession argument to MqttClientConnect()Oskari Timperi
2017-02-17Include qos/retain in OnMessage callbackOskari Timperi
2017-02-15Make the code compile using MinGWOskari Timperi
- implemented GetCurrentTime() for Windows - had to rename GetCurrentTime() to MqttGetCurrentTime() because of name clashes - setup headers correctly
2017-02-15Add SocketSelect() to wrap select()Oskari Timperi
This also makes all the necessary includes for sockets centralized to `sockets.c`.
2017-02-14Fixes to -std=c99 compilationOskari Timperi
2017-02-14Include config.h initially with MQTT_INLINE definitionOskari Timperi
2017-02-14Free packets from outMessages and inMessages when freeing clientOskari Timperi
2017-02-14Fixes to make valgrind happyOskari Timperi
2017-02-14Take bstrlib into useOskari Timperi
I should've done this from the start. :-)
2017-02-12Fixes to make code to almost compile on -std=c89 settingOskari Timperi
2017-02-12Implement willOskari Timperi
2017-02-12Add all the stuffOskari Timperi