Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared-bindings/socket: add socket.recv_into #1682

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

rhwlo
Copy link

@rhwlo rhwlo commented Mar 23, 2019

This PR:

  • adds a socket_recv_into method onto socket so that users can read from a socket without needing to allocate a new bytestring for each read
  • adds a helper function _socket_recv_into to deduplicate code between socket_recv_into and socket_recv

I wasn’t sure whether shared-bindings/socket/__init__.c was the right place to put the helper function _socket_recv_into, so apologies if there is a better place to put this!

Thanks for taking a look 😄

@dhalbert dhalbert requested a review from nickzoic March 25, 2019 03:46
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

@tannewt tannewt merged commit 8ea5fed into adafruit:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants