0

Socket select function has three arguments: readfds, writefds and errorfds. Readfds is triggered when some data arrived to socket. When writefds and errofds are triggered?

gedO
  • 548
  • 2
  • 7
  • 24

1 Answers1

0

man select

Three independent sets of file descriptors are watched. Those listed in readfds will be watched to see if characters become available for reading (more precisely, to see if a read will not block; in particular, a file descriptor is also ready on end-of-file), those in writefds will be watched to see if space is available for write (though a large write may still block), and those in exceptfds will be watched for exceptions.

(exceptfds is your errorfds.) Now that leaves open what exceptions might be. See What's a file descriptor's “exception”? for it.

Community
  • 1
  • 1
Armali
  • 18,255
  • 14
  • 57
  • 171