Skip to content

Commit

Permalink
clarified multi threaded application usage
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Mar 22, 2018
1 parent 57756f5 commit 4ad31c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/lwmqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,12 @@ lwmqtt_err_t lwmqtt_disconnect(lwmqtt_client_t *client, uint32_t timeout);
/**
* Will yield control to the client and receive incoming packets from the network.
*
* Applications may peek on the network if there is data available to read before calling yield and potentially block
* 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.
* Single-threaded applications may peek on the network and assess if data is available to read before calling yield and
* potentially block until the timeout is reached. Multi-threaded applications may select on the socket and block until
* data is available and then yield to the client if data is available. All applications may specify the amount of bytes
* available to read in order to constrain the yield to only receive packets that are already in-flight.
*
* If no availability data is given the yield will return after one packet has been successfully read or the deadline
* If no availability info 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

0 comments on commit 4ad31c7

Please sign in to comment.