Itachi San
Itachi San

Reputation: 35

I am having trouble understanding the recv command in python? for sockets

If I do s.recv(6) does that receive the first 6 bytes of data? I am looking at the documentation, and getting confused.

Upvotes: 0

Views: 98

Answers (1)

Roman Mindlin
Roman Mindlin

Reputation: 842

bufsize value in recv sets maximum amount of data received. So - yes, you will receive first 6 bytes or less (it depends of actual length of data). Additional information here and here

Upvotes: 1

Related Questions