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

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

4.6.2 dc_clt_receive_s - Receiving messages

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

(1) Form

TP1/Client/W

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

(2) Purpose

Receives messages sent by an MHP.

Before issuing thedc_clt_receive_s function, the dc_rpc_open_s function with flags set to DCCLT_ONEWAY_RCV or DCCLT_SNDRCV must be issued.

(3) Arguments set by UAPs

(4) Argument returned

(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. Or else, the dc_rpc_open_s 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 Connection was freed 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.

(6) Notes