HP OpenVMS Systemsask the wizard |
The Question is: September 22, 1999 I can get information about whether a socket would block on a receive call when I use the socket interface provided with the DEC C RTL. But, I need, for various reasons crucial to my project, to implement my sockets at a lower level as a UCX device. The refore, I will read from and write to my sockets using $qio calls. But, I can't allow blocking on reads. Furthermore, I need a solution that works with all OpenVMS versions from 6.2 on. The one solution I have been able to find to this problem is to us e the $qio option ucx$c_msg_peek option along with the ucx$c_msg_nbio option. The problem with this solution is that it does a direct I/O when you make the call. Over time this starts eating up resources. This is unacceptable for our problem. We have found a partial solution to this problem if we were to restrict matters to OpenVMS 7.x: we can use the DEC C RTL ioctl call. But, this doesn't work on 6.2. There is an example in the OpenVMS 6.2 examples of implementing the Unix ioctl on OpenVMS, but t his example does not, in fact, work with OpenVMS 6.2 (even though the example was, as we said, found there). Also, is there a way to specify a time out on a $qio call for sockets? How are send and recv in the DEC C RTL library implemented? We would really appreciate any suggestions on this! Thank you! --Russell Dale and Alex Volnov, Information Builders, Inc. The Answer is : Use AST completion, and -- when you cannot otherwise deal with a completion that occurs later than expected, directly implement a timeout via $setimr and $cancel. Applications that are AST-based often do not require timeouts on I/O calls, though the incidence of time-based events within the application are quite commonly programmed.
|