lc_vsend explained in detail

lc_vsend explained in detail

lc_vsend

Sends a message to the vendor daemon and returns a result string.
Syntax
char *lc_vsend(
LM_HANDLE *job,
char *send_str);

lc_vsend Error Returns

23nov1.PNG

 

 

  • When asynchronous mode is enabled on the server using the "ls_vendor_msg_async = 1" value in "lsvendor.c" file, both synchronous lc_vsend clients and asynchronous lc_vsend clients can communicate with such a server.
  • The older clients can still communicate to the server using synchronous lc_vsend even if the "ls_vendor_msg_async" vendor variable is set to 1 on server-side.
  • Even if asynchronous mode is enabled on server-side, older clients can still communicate with it in synchronous mode by setting the LM_A_VSEND_NOWAIT attribute's value to 0 (which is in fact the default value).
LM_A_VSEND_NOWAIT
Type
short
Default
0

 

  • If this attribute is set to 1, it requires ls_vendor_msg_async sets to 1. However, setting ls_vendor_msg callback to 1 does
    not require LM_A_VSEND_NOWAIT to be set.
    Setting to 1 allows polling for response from lc_vsend API. If not set, lc_vsend blocks until a response is received.
  • Example usage can be found in examples/lc_vsend/lmvsend.c.
 
Was this article helpful? Yes No
No ratings
Version history
Revision #:
2 of 2
Last update:
‎Nov 26, 2020 03:26 AM
Updated by:
 
Contributors