Add InetSocket enum and placeholder TcpSocket struct#2589
Merged
stevenengler merged 1 commit intoshadow:mainfrom Dec 6, 2022
Merged
Add InetSocket enum and placeholder TcpSocket struct#2589stevenengler merged 1 commit intoshadow:mainfrom
InetSocket enum and placeholder TcpSocket struct#2589stevenengler merged 1 commit intoshadow:mainfrom
Conversation
InetSocket enum and placeholder TcpSocket structInetSocket enum and placeholder TcpSocket struct
Codecov ReportBase: 67.01% // Head: 66.67% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2589 +/- ##
==========================================
- Coverage 67.01% 66.67% -0.35%
==========================================
Files 195 197 +2
Lines 29029 29171 +142
Branches 5716 5743 +27
==========================================
- Hits 19454 19449 -5
- Misses 5044 5184 +140
- Partials 4531 4538 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
robgjansen
approved these changes
Dec 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is in preparation for wrapping the C
TCPobject in a RustTcpSocketfile object. This brings our rust file object hierarchy to:Each enum has corresponding
RefandRefMutenums as well. For example, there is aInetSocketenum, aInetSocketRefenum, and aInetSocketRefMutenum. It's a lot of extra boilerplate code, but makes working with files/sockets much nicer.Eventually when the network interface is in Rust, it will deal with
InetSocketobjects, which will be a common interface for TCP and UDP sockets.I originally thought about combining the TCP (stream) and UDP (dgram) socket structs into a single
InetSocketstruct (like howUnixSocketsupports both stream and dgram protocols), but decided against it for now.