x/net: add Deadline, ReadBuffer, ReadDeadline, WriteBuffer, WriteDeadline getters #13196
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Currently there are the following setter functions in the net package for the IPConn, TCPConn, UDPConn, and UnixConn objects:
Under the covers, these all call the unix C
setsockopt()
functionSince
setsockopt
has a correspondinggetsockopt
function, I'm proposing that we add the corresponding Getter functions to thenet
package, looking something like this:This shouldn't be too difficult to implement, since the generated
zsyscall_*.go
files already have thegetsockopt
function.This could be useful for debugging and logging information, and for checking if the corresponding
Set
function needs to be called.The text was updated successfully, but these errors were encountered: