3

In python the recv is a blocking function or not? 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.

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.