开发者

Python tcp send receive functions

开发者 https://www.devze.com 2023-03-13 06:45 出处:网络
In python the recv is a blocking function or no开发者_如何转开发t? I\'m learned in the Uni C and there the was blocking and non-blocking socket. So I just wan to ask weather in python the recv functio

In python the recv is a blocking function or no开发者_如何转开发t? I'm learned in the Uni C and there the was blocking and non-blocking socket. So I just wan to ask weather in python the recv function is a blocking function or not.


Sockets in Python are blocking by the default. This behavior can be changed with setblocking or settimeout.

Another good place to find information on this is the socket how-to, especially the section on non-blocking sockets.


The socket in Python is blocking by default, unless you change it.

0

精彩评论

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