dc_rap_disconnect - Release a connection with a RAP-processing listener

Format

ANSI C, C++

#include <dcrap.h>
int dc_rap_disconnect(DCRAP_SV_ID sv_id, DCLONG rflags)

K&R C

#include <dcrap.h>
int dc_rap_connect(sv_id, rflags)
DCRAP_SV_ID sv_id;
DCLONG      rflags;

Description

The function dc_rap_disconnect releases a connection established between a RAP-processing listener and a RAP-processing client.

Arguments whose values are set in the UAP

sv_id

Specify the service ID that was received for the function dc_rap_connect.

rflags

Specify DCNOFLAGS.

Return values

Return valueReturn value (numeric)Explanation
DC_OK0Normal termination. The connection with the RAP-processing listener was released.
DCRAPER_PARAM-5501The argument is invalid. Possible causes are as follows:
  • The service ID differs from the service ID received by the function dc_rap_connect.
DCRAPER_PROTO-5502The protocol is invalid. Possible causes of the error are as follows:
  • The function dc_rpc_open was not called.
  • Although the rpc_rap_auto_connect operand in the user service definition had been set to Y, the function dc_rap_disconnect was called.
  • The -w option was not specified in the dcsvgdef definition command in the user service network definition.
DCRAPER_NOMEMORY-5503The memory became insufficient.
DCRAPER_NETDOWN-5505A network error occurred during communication with the RAP-processing listener.
DCRAPER_TIMEDOUT-5506A timeout occurred during communication with the RAP-processing listener.
DCRAPER_SHUTDOWN-5521The RAP-processing listener is being terminated.
DCRAPER_NOCONTINUE-5522An error which prevents continuation of processing occurred. Possible causes of the error are as follows:
  • An unexpected message was received.
  • A message was received unexpectedly from a remote system.
DCRAPER_SYSCALL-5523An unexpected error occurred during system call.

Note

If the function dc_rap_disconnect returns with an error (returns with a value other than DCRAPER_PARAM or DCRAPER_PROTO), the connection with the RAP-processing listener was released. The error code acquired by the UAP trace is as follows:

0: No error
1: The function dc_rpc_open() was not called.
3: The dc_rap_disconnect() function was called while the value Y was specified in the rpc_rap_auto_connect operand in the user service definition.