-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
socket options: add support for directly creating ipv4/ipv6 pairs #18769
Changes from 2 commits
a0624a3
b296c21
879582e
72213b1
68b4ab8
4606ede
e3ef40f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,8 +299,16 @@ class Socket { | |
virtual absl::optional<Details> | ||
getOptionDetails(const Socket& socket, | ||
envoy::config::core::v3::SocketOption::SocketState state) const PURE; | ||
|
||
/** | ||
* Implementations should typically return true. Unsupported or placeholder implementations | ||
* may indicate such by returning false. | ||
* @return Whether this is an actual socket option. | ||
*/ | ||
virtual bool isSupported() const PURE; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What calls this at this layer? Is this something we'll be calling via EM? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's called by |
||
}; | ||
|
||
using OptionConstPtr = std::unique_ptr<const Option>; | ||
using OptionConstSharedPtr = std::shared_ptr<const Option>; | ||
using Options = std::vector<OptionConstSharedPtr>; | ||
using OptionsSharedPtr = std::shared_ptr<Options>; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe phrase this as
Whether the socket option is supported
orWhether the socket option can be applied
?I think I'd normally see the comment begin with describing what the function is supposed to do, then fill in with implementation guidelines if appropriate