Skip to content
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

proposal: syscall.RawConn: Extend or add interface to support close notify #67432

Open
cpuguy83 opened this issue May 16, 2024 · 0 comments
Open
Labels
Milestone

Comments

@cpuguy83
Copy link

Proposal Details

Currently syscall.RawConn supports notifications for read ready and write ready.
One thing we've found is we'd like to be notified when the fd is closed.
This helps prevent cases like io.Copy(w, r) from blocking forever when w is closed but r has no content to read OR when w is blocked for write but r is closed.

So far we've used used the RawConn.Control function to setup epoll notify when on hangup.
It would be nice to have the interface (or an additional interface) support this and implementations can use the runtime poller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

2 participants