Is it possible to have non blocking server and blocked I/O client communicate?
I was just wondering, is it possible to开发者_Python百科 have have two sockets that communicate to each other, and one is using blocked I/O and another is using non blocked I/O?
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.
精彩评论