HPUX ipcrecvcn[2]






 ipcrecvcn(2)                                                   ipcrecvcn(2)





 NAME
      ipcrecvcn - receive a connection on a call socket

 SYNOPSIS
      #include <sys/ns_ipc.h>

      void ipcrecvcn(
           ns_int_t calldesc,
           ns_int_t *vcdesc,
           ns_int_t *flags,
           short opt[],
           ns_int_t *result);

 DESCRIPTION
      Before calling ipcrecvcn(), ipccreate() must be called to create a new
      call socket.  When ipcrecvcn() is invoked against a call socket that
      has queued connection requests, it returns a virtual circuit (VC)
      socket descriptor to the calling process.  The VC socket descriptor
      can be used with subsequent NetIPC calls to send and receive data.

      When a socket is created, it is placed in synchronous mode by default.
      A socket can be placed in asynchronous mode by calling ipccontrol().
      When the call socket is in synchronous mode, ipcrecvcn() blocks until
      a connection request arrives or the synchronous socket timer expires.
      The timeout value can be altered by calling ipccontrol().  When the
      call socket is in asynchronous mode, ipcrecvcn() returns
      NSR_WOULD_BLOCK if no connection requests are queued for the call
      socket.

      An exception ipcselect() can be performed on the referenced call
      socket to determine if connections are pending on a call socket.

    Parameters
      calldesc            (input parameter) Socket descriptor.  Refers to a
                          call socket owned by the calling process.

      vcdesc              (output parameter) VC socket descriptor.  Refers
                          to a VC socket that is the end-point of an
                          established virtual circuit connection.

      flags               (input parameter) Must be 0.  Other values are
                          reserved for future use.

      opt                 (input parameter) See below.

      result              (output parameter) The error code returned.  Refer
                          to ERRORS below for more information.

    Opt Parameter
      NSO_MAX_SEND_SIZE        (optioncode = 3) (datalength = 2) A signed
                               two-byte integer that specifies the maximum



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 ipcrecvcn(2)                                                   ipcrecvcn(2)





                               number of bytes you expect to send with a
                               single ipcsend() (see ipcsend(2)) call on the
                               VC socket.  Range: 1 to 32000 bytes.
                               Default: 100 bytes.

      NSO_MAX_RECV_SIZE        (optioncode = 4) (datalength = 2) A signed
                               two-byte integer that specifies the maximum
                               number of bytes you expect to receive with a
                               single ipcrecv() (see ipcrecv(2)) call on
                               this connection.  Range: 1 to 32000 bytes.
                               Default: 100 bytes.

 RETURN VALUE
      None.  Errors are returned in the result parameter.

 ERRORS
      [NSR_DESC]                    calldesc is not a valid socket
                                    descriptor.

      [NSR_BOUNDS_VIO]              A length or offset value in the opt
                                    parameter is invalid.

      [NSR_DUP_OPTION]              A particular option is defined more than
                                    once in the opt parameter.

      [NSR_MSGSIZE]                 The value specified in NSO_MAX_SEND_SIZE
                                    or NSO_MAX_RECV_SIZE is invalid.

      [NSR_NO_ERROR]                The call was successful.

      [NSR_NOT_CALL_SOCKET]         calldesc is not a call socket.

      [NSR_OPT_OPTION]              The option in opt parameter is unknown
                                    or unsupported.

      [NSR_OPT_SYNTAX]              A length or offset value in the opt
                                    parameter is invalid.

      [NSR_SIGNAL_INDICATION]       A signal was received before a
                                    connection request arrived.

      [NSR_SOCKET_TIMEOUT]          The socket timer expired before a
                                    connection request arrived.

      [NSR_WOULD_BLOCK]             The socket is in asynchronous mode and
                                    no connection requests are pending.

 AUTHOR
      ipcrecvcn() was developed by HP.





 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 ipcrecvcn(2)                                                   ipcrecvcn(2)





 SEE ALSO
      ipcconnect(2), ipccontrol(2), ipccreate(2), ipcdest(2),
      ipcgetnodename(2), ipclookup(2), ipcname(2), ipcnamerase(2),
      ipcrecv(2), ipcselect(2), ipcsend(2), ipcsetnodename(2),
      ipcshutdown(2), addopt(3N), initopt(3N), ipcerrmsg(3N),
      optoverhead(3N), readopt(3N).
















































 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992