Python tcp sends receive functions

In python, recv is a blocking function or not? I found out in Uni C, and there was a blocking and non-blocking socket. So I just want to ask the weather in python whether the recv function is a blocking function or not.

+3
source share
2 answers

Sockets in Python are blocked by default. This behavior can be changed with setblockingor settimeout.

Another good place to look for information is the socket manual , especially the non-blocking socket section .

+5
source

A socket in Python is blocked by default unless you change it.

+1
source

All Articles