OpenTP1 Version 7 Programming Reference C Language
dc_rpc_cltsend - Report data to CUP unidirectionally
Format
ANSI C, C++
#include <dcrpc.h> int dc_rpc_cltsend (char *hostname, unsigned short port, char *msg, DCLONG len, DCLONG flags) |
K&R C
#include <dcrpc.h> int dc_rpc_cltsend (hostname, port, msg, len, flags) char *hostname; unsigned short port; char *msg; DCLONG len; DCLONG flags; |
Description
The function dc_rpc_cltsend() sends data to the CUP unidirectionally. This function sends data specified for msg of the length specified for len to the process (CUP) corresponding to the port number of the host specified for hostname and port. The possible sending data length is in the range of bytes from 0 to DCRPC_MAX_MESSAGE_SIZE#.
Data sent by the function dc_rpc_cltsend() is received by the TP1/Client library function dc_clt_chained_accept_notification() or dc_clt_accept_notification(). For the function dc_clt_chained_accept_notification() or dc_clt_accept_notification(), see the manual OpenTP1 TP1/Client/W, TP1/Client/P.
Arguments whose values are set in the UAP
hostname
Specify the name of the host to which data is sent. You can specify a character string containing between 1 and 255 characters as the host name. End the character string with a null character.
port
Specify the number of the port to which data is sent.
msg
Specify data to be sent.
len
Specify the length of data to be sent.
flags
Specify DCNOFLAGS.
Return values
Return value | Return value (numeric) | Explanation |
---|---|---|
DC_OK | 0 | Normal termination. |
DCRPCER_INVALID_ARGS | -301 | The value specified for the argument is invalid. |
DCRPCER_NET_DOWN | -306 | A network error occurred. |
DCRPCER_PROTO | -302 | The function dc_rpc_open() was not called. |
DCRPCER_NO_BUFS | -304 | The memory became insufficient. |
DCRPCER_MESSAGE_TOO_BIG | -308 | The length of data to be sent exceeds DCRPC_MAX_MESSAGE_SIZE#. |
DCRPCER_SERVICE_NOT_UP | -314 | There is no process at the destination. |
A network error occurred. |
Notes
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.