HP OpenVMS Systemsask the wizard |
The Question is: If I may followup on #218: UCX non-blocking sockets. I am unable to find a ref for set_socket_non_blocking(). The socket guide refers to setsockopt() but nothing there refers to non-blocking We tried select() to get around blocking on accept() but neither our program nor UCX$UPD_SERVER_IPC.C compiles. The socket guide and the example program specify args that are pointers to int but the compiler references incompatiblity with "struct fd_set" which we are not able to find in the .h files or documentation. We would prefer the c interface rather than QIO if it is possible. Is there other docs that would help. Thanks in advance. David Brotherston The Answer is :
Please contact the customer support center for assistance with the
(unspecified) incompatibilities with the fd_set structure in the
header files. Error message(s) and/or source code may be required.
Also consider using the ioctl call to perform this task. For an
example, please see UCX$IOCTL_ROUTINE.C, or please see:
/*
// ioctl to set socket non-blocking I/O
*/
request = FIONBIO;
if ((argp = (char*)malloc(sizeof (FIONBIO))) == NULL)
{
perror("Error:malloc");
...
}
*(int*)argp = 1;
if (ioctl(s, request, argp) == -1)
{
perror("Error:ioctl");
...
}
There was a change to sys$share:ucx$rpcxdr.h to resolve an apparent
problem with fd_set: see svc_fdset.
|