OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
#include <dcvclt.h> DCLONG dc_clt_assem_receive_s(DCCLT_ID cltid, char CLTFAR *buff, DCLONG CLTFAR *recvleng, DCLONG timeout, DCLONG flags)
#include <dcvclt.h> DCLONG dc_clt_assem_receive(char CLTFAR *buff, DCLONG CLTFAR *recvleng, DCLONG timeout, DCLONG flags)
The dc_clt_assem_receive_s function uses the message assembly facility to receive messages. When this facility is used, the function receives four-byte message information, and then receives data equivalent to the size set in the message information. The function then stores the data in the buff argument. The four-byte message information is not stored in the buff argument. The length of the received message is stored in the recvleng argument. The message length stored in the recvleng argument does not include the message information length.
If Y is specified for DCCLTDELIVERYCHECK of the client environment definition, the message delivery confirmation facility is used when a message is sent or received. In this case, the function receives 11-byte message information, and then receives data equivalent to the size set in the message information. The function then stores the data in the buff argument. The 11-byte message information is not stored in the buff argument. The length of the received message is stored in the recvleng argument. The message length stored in the recvleng argument does not include the message information length. If the received message information includes a response request, the function sends 11-byte message information, and then returns control to the CUP.
Before issuing this function, make sure that you issue the dc_rpc_open_s function in which DCCLT_ONEWAY_RCV or DCCLT_SNDRCV is specified for the flags argument.
Return value | Value (decimal) | Meaning |
---|---|---|
DC_OK | 0 | Normal termination |
DCCLTER_INVALID_ARGS | -2501 | Invalid argument |
DCCLTER_PROTO | -2502 | Possible causes are as follows:
|
DCCLTER_NO_BUFS | -2504 | Insufficient memory |
DCCLTER_NET_DOWN | -2506 | A network error occurred. The connection is released. |
DCCLTER_TIMED_OUT | -2507 | Message reception timed out. The connection is released. |
DCCLTER_SYSERR | -2518 | A system error occurred. If the error is a network error, the connection is released. |
DCCLTER_RESOURCE | -2538 | Insufficient resource |
DCCLTER_CONNFREE | -2542 | The connection was released by the remote system. |
DCCLTER_INVALID_CLTID | -2544 | The client ID specified for cltid differs from the one received by the dc_clt_cltin_s function. |
DCCLTER_INF_TOO_BIG | -2546 | The area prepared by the CUP was too small to receive the message from the remote system. The connection is released. |
DCCLTER_INVALID_MESSAGE | -2548 | An invalid message was received. The connection is released. |
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.