Skip to content

Commit

Permalink
Made directrequest sync only. Ref: #30
Browse files Browse the repository at this point in the history
  • Loading branch information
sshanks-kx committed Apr 2, 2020
1 parent b9d6359 commit ab4f89c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Used for sending direct messages (Ref: https://docs.solace.com/PubSub-Basics/Dir
K senddirectrequest_solace(K topic, K data, K timeout);
```

Used for sending direct messages that require a reply. Works as per senddirect_solace with an extra integer timeout param that indicate the millisecons to block/wait. Returns a byte list of message received, containing the payload. Otherwise will be an int to indicate the return code. If value 7, the reply wasnt received. If value 2 then the reply is currently in progress
Used for sending direct messages that require a sync reply. Works as per senddirect_solace with an extra integer timeout param that indicate the millisecons to block/wait (must be greater than zero). Returns a byte list of message received, containing the payload. Otherwise will be an int to indicate the return code. If value 7, the reply wasnt received.

```
K callbackdirect_solace(K cb);
Expand Down
2 changes: 2 additions & 0 deletions source/deltasolace.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,8 @@ K senddirect_solace(K topic, K data)
CHECK_PARAM_TYPE(topic,-KS,"senddirectrequest_solace");
CHECK_PARAM_DATA_TYPE(data,"senddirectrequest_solace");
CHECK_PARAM_TYPE(timeout,-KI,"senddirectrequest_solace");
if (timeout->i <= 0)
krr((char*)"senddirectrequest_solace must be provided with timeout greater than zero");
solClient_opaqueMsg_pt msg_p = createDirectMsg(topic,data);
solClient_opaqueMsg_pt replyMsg = NULL;
solClient_returnCode_t retCode = solClient_session_sendRequest ( session_p, msg_p, &replyMsg, timeout->i);
Expand Down
5 changes: 2 additions & 3 deletions source/deltasolace.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ K senddirect_solace(K topic, K data);
*
* @param topic Should be a string. The Topic to send data to.
* @param data Can be a symbol or string or byte array. The payload of the message.
* @param timeout Integer type representing milliseconds to wait/block
* @param timeout Integer type representing milliseconds to wait/block, must be greater than 0
* @return Returns a byte list of message received, containing the payload. Otherwise will be an int
* to indicate the return code. If value 7, the reply wasnt received. If value 2
* then the reply is currently in progress
* to indicate the return code. If value 7, the reply wasnt received.
*/
K senddirectrequest_solace(K topic, K data, K timeout);

Expand Down

0 comments on commit ab4f89c

Please sign in to comment.