Gives away a VC socket or call socket descriptor, making it
available for use by other processes.
Description |
|
A process can invoke IPCGIVE to give away a VC socket or call socket descriptor
that it owns. Another process at the same node must then "get" the
descriptor in order to use it. For example, Process A at node X can
give away a VC socket descriptor. Process B, also at node X, may
get the descriptor and send data over the connection that Process
A has previously established with process C at node Z. Because Process
B "got" the endpoint of a previously established
connection, it does not need to create its own call socket and engage
in the NetIPC connection dialogue in order to communicate with Process
C.
All the parameters are required.
When a socket is given away, it is assigned a new, temporary
name. This name is either specified by the user or assigned by the
NetIPC facility. It continues to exist only until the socket is
obtained by another process or destroyed. The other process uses
this name in a call to IPCGET, not IPCLOOKUP. However, the syntax of the name is the same as it
is for other intrinsics permitting socket name parameters. Therefore it
is possible to use a socket's "well-known" name — a
name bound to the socket and known to other processes — in
the IPCGIVE and IPCGET intrinsics.
Once a process has given away a socket, it no longer has access
to the VC socket (or call socket) descriptor specified. If a process
expires after giving away a socket, and no other process has obtained
it, the VC socket or call socket will be destroyed.
Also, after a socket has been given away, it is the responsibility
of the new owning process to tell other processes that the socket
has been acquired. Other processes will then know who is receiving
the data they send.
Condition codes returned by this intrinsic are:
CCG — Not returned by this intrinsic.
This intrinsic cannot be called in split stack mode.