Question

I was just wondering, is it possible to have have two sockets that communicate to each other, and one is using blocked I/O and another is using non blocked I/O?

Was it helpful?

Solution

This should indeed be possible. The question of whether a socket is blocking or non-blocking is an application-layer concern, whereas how the data gets transmitted between the computers is a job for lower layers of the networking stack. Consequently, if you have a blocking socket, the underlying transport mechanism has no knowledge of this and is free to send and receive data as it sees fit with other machines without caring about whether the receiving application is using blocking or non-blocking sockets.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top