If I do s.recv(6) does that receive the first 6 bytes of data? I am looking at the documentation, and getting confused.
-
2Can you be any more explicit about what's confusing you?David Z– David Z2017年09月18日 19:01:29 +00:00Commented Sep 18, 2017 at 19:01
-
I guess I just want to know if doing recv(6) receives the first 6 bytes of data or not lolItachi San– Itachi San2017年09月18日 19:14:09 +00:00Commented Sep 18, 2017 at 19:14
-
stackoverflow.com/questions/7174927/…Open AI - Opting Out– Open AI - Opting Out2017年09月18日 19:30:01 +00:00Commented Sep 18, 2017 at 19:30
-
1@ItachiSan I guess I'm just having a hard time understanding why you couldn't tell that from the documentation, or what reason you have to think it might do anything other than receiving the first 6 bytes of data.David Z– David Z2017年09月18日 20:21:54 +00:00Commented Sep 18, 2017 at 20:21
1 Answer 1
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
answered Sep 18, 2017 at 19:30
Roman Mindlin
8521 gold badge8 silver badges13 bronze badges
Sign up to request clarification or add additional context in comments.
2 Comments
Itachi San
Is there a way to increase the byte size of a string?
Roman Mindlin
You can set a larger
bufsizelang-py