0

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

asked Sep 18, 2017 at 18:59
4
  • 2
    Can you be any more explicit about what's confusing you? Commented 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 lol Commented Sep 18, 2017 at 19:14
  • stackoverflow.com/questions/7174927/… Commented 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. Commented Sep 18, 2017 at 20:21

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

2 Comments

Is there a way to increase the byte size of a string?
You can set a larger bufsize

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.