HP-UX SNAplus2 R7 LUA Programmer's Guide
SLI Verbs
SLI_RECEIVE
The stack size of the application is too small for LUA to complete the request. Increase the stack size
of your application.
lua_prim_rc
LUA_UNEXPECTED_DOS_ERROR
An operating system error occurred.
lua_sec_rc
This value is the operating system return code. Check your operating system documentation for the meaning
of this return code.
5.5.3 Interaction with Other Verbs
The SLI_OPEN verb must have completed successfully before this verb can be issued.
While an existing SLI_RECEIVE is pending, you can issue another SLI_RECEIVE only if it specifies a different
session flow or flows from pending SLI_RECEIVEs; you cannot have more than one SLI_RECEIVE outstanding
for the same session flow.
The
lua_flag1.bid_enable parameter can only be used if the following are true:
• SLI_BID has already been issued successfully and has completed
• The storage allocated for the SLI_BID verb has not been freed or modified
• No other SLI_BID is pending
If you use this parameter to re-enable a previous SLI_BID, at least one of the message flow flags on SLI_RECEIVE
must still be set, to indicate the flow or flows on which the application will accept data. If the first data to be
received is on a flow accepted by the SLI_RECEIVE verb, SLI_RECEIVE will return with this data, and SLI_BID
will not return. Otherwise, SLI_BID will return to indicate that there is data to be read (since SLI_BID accepts data
on all flows, it will always accept the data if SLI_RECEIVE does not). The application must then issue another
SLI_RECEIVE on the appropriate flow to obtain the data.
If you want to use SLI_BID to handle data on all flows, rather than having the data on a particular flow handled by
SLI_RECEIVE in preference to SLI_BID, you need to re-issue SLI_BID explicitly instead of using SLI_RECEIVE
to re-enable the previous SLI_BID.
5.5.4 Usage and Restrictions
If the data received is longer than the lua_max_length parameter, it will be truncated; only lua_max_length bytes
of data will be returned. The primary and secondary return codes
LUA_UNSUCCESSFUL and LUA_DATA_TRUNCATED
will also be returned.
If the SLI_RECEIVE verb sets bits in lua_flag1 to accept data on more than one flow, and there is data available
on more than one of the specified flows, the data on the highest-priority flow will be returned to the application.
The flow priorities are as follows (highest to lowest):
• SSCP expedited
• LU expedited
• SSCP normal
• LU normal
Once a message has been read using the SLI_RECEIVE verb, it is removed from the incoming message queue,
and cannot be accessed again. The application can use SLI_BID as a non-destructive read to check the type of
data available and determine how to process it, and then issue a subsequent SLI_RECEIVE to collect the data.
However, if it issues the SLI_RECEIVE with multiple lua_flag1 flags set to accept data on more than one flow, it
may receive a different message from the one identified in the SLI_BID, if data arrived on a higher-priority flow
136