HP OpenVMS Systems

ask the wizard
Content starts here

IP, select, and polling?

» close window

The Question is:

Timed I/O on sockets
I'm currently using:
DIGITAL TCP/IP Services for OpenVMS Alpha Version V5.0A on a AlphaServer 8400
 5/625 running OpenVMS v7.2-1
I am trying to develop an I/O interface using the C Socket API, and have run
 into a problem using the select function.  We currently need to support more
 than 32 socket connections in a multi-threaded program and the ability to
 perform timed I/O.
Something like the UNIX function poll, which allows a program to wait on any
 given socket until it is ready for reading and/or writing, would be ideal.  I
 checked the documentation and couldn't find it defined.  Is there a similar
 function on VMS?  If not
 what is the best way to implement this function using QIO's and the
 decc$get_sdc function?

The Answer is :

  The use of the AST and the $qio interface to TCP/IP Services would be
  the choice of the OpenVMS Wizard, as polling is usually an inappropriate
  and ugly crock.
  Also, the select call supports more than one longword (32 bits) of
  channels with recent versions of OpenVMS and TCP/IP Services.  The
  current limits are based on the numbers of available channels, which
  has an upper limit of 2047 on OpenVMS VAX and 65535 on OpenVMS Alpha.
  (If you wish to use more than 32 sockets in select, alter FD_SETSIZE.)
  There are a few references left in the documentation to longwords and
  the old limit of 32 channels, and these are now reportedly outdated.

answer written or last revised on ( 11-OCT-2000 )

» close window