开发者

Is it possible to have non blocking server and blocked I/O client communicate?

开发者 https://www.devze.com 2023-02-04 08:03 出处:网络
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 p

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消