| 
 | 
  | 
 
  
  Gives away a VC socket or call socket descriptor, making it available for use
  by other processes.
  Syntax
  
 IPCGIVE  ( descriptor, givename, nlen, flags, result )
   
  Parameters
  
    - descriptor (input)
 
    
    - 32-bit integer, by value. The VC socket or call socket descriptor
        to be given away.
 
    
    - givename (input/output)
 
    
    - Character array, by reference. A name which will be temporarily
        assigned to the specified socket. The process which obtains the socket
        must request it by this name. If the nlen (name length)
        parameter is zero, an 8-character name is randomly assigned and returned
        in the givename parameter. If the name is supplied by
        the user, it must be no longer than 16 characters.
 
    
    - nlen (input)
 
    
    - 32-bit integer, by value. Length in bytes of the specified name.
        If the value is zero, the NetIPC facility will assign the name.
 
    
    - flags
 
    
    - 32 bits, by reference. A bit representation of various options.
        No flags are currently defined for this intrinsic.
 
    
    - result (output)
 
    
    - 32-bit integer, by reference. The error code returned; zero if no
        error.
 
   
  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:
  
    - CCE — Succeeded.
 
    
    - CCL — Failed.
 
    
    - CCG — Not returned by this intrinsic.
 
   
  This intrinsic cannot be called in split stack mode.
  
 
 |