Skip to content

Commit

Permalink
corrected docs
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Oct 18, 2017
1 parent 89b417f commit 759bf9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 5 additions & 3 deletions include/lwmqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef void (*lwmqtt_timer_set_t)(void *ref, uint32_t timeout);
* The callback used to get a timers value.
*
* @param - A custom reference.
* @return The amount of milliseconds until the deadline. May return negative number if the deadline has been reached.
* @return The amount of milliseconds until the deadline. May return negative numbers if the deadline has been reached.
*/
typedef int32_t (*lwmqtt_timer_get_t)(void *ref);

Expand Down Expand Up @@ -259,6 +259,7 @@ typedef enum {
* @param client - The client object.
* @param options - The options object.
* @param will - The will object.
* @param return_code - The variable that will receive the return code.
* @param timeout - The command timeout.
* @return An error value.
*/
Expand All @@ -285,7 +286,7 @@ lwmqtt_err_t lwmqtt_publish(lwmqtt_client_t *client, lwmqtt_string_t topic, lwmq
*
* @param client - The client object.
* @param count - The number of topic filters and QOS levels.
* @param topic_filter - The topic filters.
* @param topic_filter - The list of topic filters.
* @param qos - The list of QOS levels.
* @param timeout - The command timeout.
* @return An error value.
Expand Down Expand Up @@ -348,7 +349,8 @@ lwmqtt_err_t lwmqtt_disconnect(lwmqtt_client_t *client, uint32_t timeout);
* until the timeout is reached. Furthermore, applications may specify the amount of bytes available to read in order
* to constrain the yield to only receive packets that are already inflight.
*
* If no availability data is given the yield will return after one packet has been successfully read.
* If no availability data is given the yield will return after one packet has been successfully read or the deadline
* has been reached but no single bytes has been received.
*
* Note: The message callback might be called with incoming messages as part of this call.
*
Expand Down
10 changes: 9 additions & 1 deletion include/lwmqtt/unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ typedef struct { struct timeval end; } lwmqtt_unix_timer_t;

/**
* Callback to set the UNIX timer object.
*
* @see lwmqtt_timer_set_t.
*/
void lwmqtt_unix_timer_set(void *ref, uint32_t timeout);

/**
* Callback to read the UNIX timer object.
*
* @see lwmqtt_timer_get_t.
*/
int32_t lwmqtt_unix_timer_get(void *ref);

Expand Down Expand Up @@ -46,18 +50,22 @@ void lwmqtt_unix_network_disconnect(lwmqtt_unix_network_t *network);
* Function to peek available bytes on a UNIX network connection.
*
* @param network - The network object.
* @param available - The available bytes.
* @param available - Variables that must be set with the available bytes.
* @return An error value.
*/
lwmqtt_err_t lwmqtt_unix_network_peek(lwmqtt_unix_network_t *network, size_t *available);

/**
* Callback to read from a UNIX network connection.
*
* @see lwmqtt_network_read_t.
*/
lwmqtt_err_t lwmqtt_unix_network_read(void *ref, uint8_t *buf, size_t len, size_t *read, uint32_t timeout);

/**
* Callback to write to a UNIX network connection.
*
* @see lwmqtt_network_write_t.
*/
lwmqtt_err_t lwmqtt_unix_network_write(void *ref, uint8_t *buf, size_t len, size_t *sent, uint32_t timeout);

Expand Down

0 comments on commit 759bf9c

Please sign in to comment.