-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: syscall: add Conn and RawConn interfaces #19435
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
Comments
The detail of the proposed APIs by Mr. Cox is the following:
and then an implementation of a net.Conn may optionally implement syscall.Conn to provide access to its fd as a syscall.RawConn. |
CL https://golang.org/cl/37039 mentions this issue. |
CL https://golang.org/cl/37913 mentions this issue. |
CL https://golang.org/cl/37038 mentions this issue. |
@rsc, What's the current status of this proposal? |
LGTM here and on the CL. |
This change adds RawControl, RawRead and RawWrite methods to type FD to make the runtime-integrated network poller work together with a user-defined function. The methods are used via the net package from external packages and type FD is considered as an implementation of syscall.Conn and syscall.RawConn interfaces. Updates #19435. Change-Id: I4ad04b10ffddb2b54fa8d70587440960d73c0a2d Reviewed-on: https://go-review.googlesource.com/37038 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This change makes {TCP,UDP,IP,Unix}Conn types compliant of syscall.Conn interface and adds type rawConn as an implementation of syscall.RawConn interface. By this change, the long-standing issues regarding unsupported socket options and system calls can be solved partly and the broken x/net packages due to https://go-review.googlesource.com/36799 can be repaired. Fixes #3661. Updates #9661. Updates #19051. Updates #19435. Change-Id: Ic996b040418b54f6d043bc70591789d5a5b23270 Reviewed-on: https://go-review.googlesource.com/37039 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This is a followup to https://go-review.googlesource.com/37038. Updates #19435. Change-Id: If3d56bca0e8816d1a169f5cf97f27b20695a9955 Reviewed-on: https://go-review.googlesource.com/43692 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This is a followup to https://go-review.googlesource.com/37039. Updates #19435. Change-Id: Ia795bd5158d26effa56e897698208ccf73f9e0d2 Reviewed-on: https://go-review.googlesource.com/43693 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/71651 mentions this issue: |
This change adds the syscall.Conn interface to Listener types, with the caveat that only RawConn.Control is supported. Custom socket options can now be set safely. Updates #19435 Fixes #22065 Change-Id: I7e74780d00318dc54a923d1c628a18a36009acab Reviewed-on: https://go-review.googlesource.com/71651 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/107395 mentions this issue: |
Updates #19435. Change-Id: Ife4a31972b05094a86c60a48fcacdfe52d133ee4 Reviewed-on: https://go-review.googlesource.com/107395 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Please take a look at the discussion: https://groups.google.com/d/msg/golang-dev/tcl_XFLUfcE/V6JUoZD-DAAJ
The story is like the following:
The text was updated successfully, but these errors were encountered: