OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

4.6.3 dc_clt_receive2_s - Receiving messages (messages receivable even if an error occurs)

Organization of this subsection
(1) Form
(2) Purpose
(3) Arguments set by UAPs
(4) Argument returned from
(5) Return values
(6) Notes

(1) Form

(a) TP1/Client/W
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_receive2_s(DCCLT_ID cltid, char *buff,
                         DCLONG *recvleng, DCLONG timeout,
                         DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_receive2(char *buff, DCLONG *recvleng,
                       DCLONG timeout, DCLONG flags)
 
(b) TP1/Client/P
_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_receive2_s(DCCLT_ID cltid, char CLTFAR *buff,
                         DCLONG CLTFAR *recvleng,
                         DCLONG timeout,
                         DCLONG flags)
 
Non-_s version of the function
 
#include <dcvclt.h>
DCLONG dc_clt_receive2(char CLTFAR *buff,
                       DCLONG CLTFAR *recvleng,
                       DCLONG timeout, DCLONG flags)
 

(2) Purpose

Receives messages from the MHP.

Before issuing the dc_clt_receive2_s function, you need to issue the dc_rpc_open_s function with flags set to DCCLT_ONEWAY_RCV or DCCLT_SNDRCV.

(3) Arguments set by UAPs

(4) Argument returned from

(5) Return values

Return Value Value (decimal) Meaning
DC_OK 0 Normal termination
DCCLTER_INVALID_ARGS -2501 Invalid argument
DCCLTER_PROTO -2502 The dc_rpc_open_s function has not been issued. Alternatively the dc_rpc_open function has been issued with DCCLT_ONEWAY_RCV or DCCLT_SNDRCV not specified in flags.
DCCLTER_NO_BUFS -2504 Insufficient memory
DCCLTER_NET_DOWN -2506 Network error
DCCLTER_TIMED_OUT -2507 Timeout occurred during reception of the message.
DCCLTER_SYSERR -2518 System error
DCCLTER_RESOURCE -2538 Insufficient resource
DCCLTER_CONNFREE -2542 The remote system released the connection.
DCCLTER_INVALID_CLTID -2544 The client ID specified for cltid differs from the one received by the dc_clt_cltin_s function.

(6) Notes