Skip to content

Conversation

@haydenridd
Copy link

I've added in the ability to query the transmit/receive buffer counts for Linux and Windows (I don't have a Mac to test on)! This is particularly useful for the receive buffer, as a read call will block until there's a byte to be read. Added some basic tests that just make sure the counts are 0 after a the buffers have been cleared.

Verified this actually works as expected on Linux + Windows. One thing to note is I was never able to get the transmit buffer count to increment on Windows. However, it very well could be that the OS is simply flushing the buffer faster than I can query it immediately after writing.

return error.Unexpected;
},

.macos => {},
Copy link
Author

Choose a reason for hiding this comment

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

I thought this was odd and should likely be a compile error instead of silent, but could be missing something!

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.

1 participant