I am trying to understand select() and non-blocking I/O concept.
but still not got what will happen if use Blocking I/O with select() and what about if use non-blocking with select().
I read, select() is already block call. then how does it works?
what will happen if use Blocking I/O with select()
You will get an IllegalBlockingModeException.
select() is already block call. then how does it works?
It blocks until an event that is being selected on occurs, or the timeout expires, if any.
0
votes
It is perfectly fine to use select() or poll() with blocking or non-blocking sockets. Call to select() itself will be blocked until (one of the) socket(s) provided to select() will become available for reading.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more