2

I'm coding a UDP datagram receiver in C++ on the QNX operating system and I want to perform non-blocking recvfrom() calls.

The QNX man page on recvfrom() suggests that I somehow can put a socket in a non-blocking mode using ioctl(). Unfortunately, the man page on ioctl() isn't much of a help.

Can anybody tell me about the arguments I have to pass to ioctl() to set the socket to non-blocking?

Mat
  • 202,337
  • 40
  • 393
  • 406
MBober
  • 1,095
  • 9
  • 25

1 Answers1

2

The ioctl doc for QNX 6.4.0 has a bit more info:

FIONBIO

Set or clear non-blocking I/O

The ioctl call should look something like this:

int on = 1;
ioctl(fd, FIONBIO, &on);
Community
  • 1
  • 1
Mat
  • 202,337
  • 40
  • 393
  • 406