NetIPC 3000/XL Programmer's Reference Manual (5958-8600)
Table Of Contents
- 1 NetIPC Fundamentals
- 2 Cross-System NetIPC
- 3 NetIPC Intrinsics
- 4 NetIPC Examples
- A IPC Interpreter (IPCINT)
- B Cause and Diagnostic Codes
- C ErrorMessages
- D Migration From PTOP to NetIPC and RPM
- E C Program Language Considerations

102 Chapter3
NetIPC Intrinsics
IPCRECV
NOTE
If using nowait I/O and
opt
array options that generate output, the
array must remain intact until after IOWAIT completes. Otherwise, the
array area will be overwritten or (if the area has been deleted from the
stack) an error will occur.
result
(output)
32-bit integer, by reference. The error code
returned; zero if no error.
NOTE
When nowait I/O is used, the
result
parameter is not updated upon
completion of an intrinsic. Therefore, the value of
result
will indicate
only whether the call was successfully initiated. To determine if the call
completed successfully, you can use the IPCCHECK intrinsic after IOWAIT
completes.
Description
The IPCRECV intrinsic serves two purposes: (1) to receive a response to a
connection request, thereby completing a connection, and (2) to receive
user data on an established connection.
NOTE
In the first case the VC socket descriptor is the only required
parameter; in the second, the VC socket descriptor, data, and data
length parameters are required. The brackets in the syntax diagram
represent the first case.
In receiving a response to a connection request, the IPCRECV intrinsic
returns nothing in the data buffer. A result value of zero indicates a
successful connection establishment. For X.25 only, the facility field and
call user data field are returned in the option field. The
result
parameter will indicate an error if the destination rejected the request.
In that case you must still call IPCSHUTDOWN with the returned VC
socket descriptor value to shut down the connection.
Successful completion of an IPCRECV request on an established
connection (
result
code zero) means that some amount of data was
received: the amount requested or the amount transmitted, whichever
is smaller. It does not mean that you received all the data you asked for.
Completion of IPCRECV (in wait mode) with a non-zero
result
can
mean that a fatal error occurred. If nowait I/O is being used, IPCCHECK
must be called to detect a fatal error reported for the specified VC
descriptor after IOWAIT has been called and the receive completes.
Unless the intrinsic is called in nowait mode, the process is blocked
until some data arrive or a timeout occurs. In nowait mode, the
addresses of the
data
,
flags
and output
opt
options parameters are
retained by NetIPC until needed. The input value of
flags
is retained