IPCRECV

Establishes a virtual circuit connection by receiving a response to a connection request, or receives data on a previously established connection.

IPCRECV(vcdesc,data,dlen,flags,opt,result)

vcdesc32-bit integer, by value in Pascal, by reference in FORTRAN. VC socket descriptor. Refers to a VC socket that: (1) is the endpoint of a virtual circuit connection that has not yet been established, or (2) is the endpoint of a previously established virtual circuit on which data will be received.

data

Packed array of characters (Pascal); Integer

 

array (FORTRAN), by reference. A data buffer that

 

will hold the received data, or a data vector describing the

 

location where the data is to be placed.

dlen

32-bit integer, by reference. When the data

(input/output)

parameter is a data buffer, dlen is the maximum number of

 

bytes you are willing to receive. When the data parameter is a

 

data vector, dlen refers to the length of the data vector in

 

bytes. As a return parameter (output), dlen indicates how

 

many bytes were actually received.

 

If IPCRecv is used to establish a connection (not to receive

 

data), the dlen parameter is meaningless on input and a value

 

of 0 is returned on output.

 

If the DATA_WAIT flag (see flags [21] below) is zero,

 

then dlen returns with the length of whatever data there is. If

 

the DATA_WAIT flag is set to one, then either dlen returns

 

with the same amount requested or a •WOULD BLOCK"

 

error occurs.

flags

32-bit integer, by reference. A 32bit map of

(input/output)

special request bits. The first IPCRecv call establishes a

 

virtual connection and flags has no meaning. For subsequent

 

IPCRecv calls, flags will then be invoked for the established

 

connection. Flags must be initialized each time it is used by

 

any NetIPC call. The following flags are defined for this call:

 

D flags [21]3DATA_WAIT (input). When this flag is

 

set, IPCRecv waits until all the data that it requested in

 

the dlen parameter has been received. If this bit is set to

 

zero, IPCRecv may complete receiving less data than it

 

requested in dlen.

 

 

Note

User programs written prior to software Revision 5.0 that wait

 

on the IPCRecv call until dlen amount of data has been

 

received must change to set the DATA_WAIT flag to continue

 

operating as they did before.

 

 

 

D flags [31]3PREVIEW (input). When set, this flag

 

allows you to preview the data queued on the connection.

 

Data is placed in the data parameter but not dequeued

 

from the connection. Because the data is not dequeued,

 

another IPCRecv call is needed to delete the same data.

614 Network Interprocess Communication