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

Support embedded control socket on Windows #23

Open
cretz opened this issue Dec 28, 2018 · 4 comments
Open

Support embedded control socket on Windows #23

cretz opened this issue Dec 28, 2018 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@cretz
Copy link
Owner

cretz commented Dec 28, 2018

Now that golang/go#24331 landed, have a Windows version that creates a syscall.RawConn from the socket and implement the rest of net.Conn w/ dummy stuff. Also update the README and package docs.

@cretz cretz changed the title Support embedded control socket on Windows in Go 1.12 Support embedded control socket Jan 17, 2019
@cretz cretz changed the title Support embedded control socket Support embedded control socket on Windows Jan 17, 2019
@cretz
Copy link
Owner Author

cretz commented Jan 17, 2019

I'm afraid this still isn't enough to easily make a net.Conn out of a Windows socket. I would end up duplicating the FileConn efforts done in the Go repo issue referenced in #13.

@lu4p
Copy link
Contributor

lu4p commented Mar 3, 2019

I would like to implement this, can you give some more info on where to start?

@cretz
Copy link
Owner Author

cretz commented Mar 5, 2019

@lu4p - Hi. This is a bit of work. I've played with it some, and you'll end up using syscalls to winsock APIs among other things. At first it seems trivial to take a socket handle and create a net.Conn, just reads, writes, some deadlines, etc. However, it becomes tricky to do from a syscall.RawConn as we're given now. The best way would be to implement it in Go (see the referenced issues), but in the meantime the ideal way to solve this would be to create a simple project that properly implements net.Conn with a Windows socket handle. I'll gladly leverage it.

@cretz
Copy link
Owner Author

cretz commented Jun 13, 2021

Adding help wanted tag. Until the Go issues mentioned in the PR at #13 are done, this would be a manual effort w/ syscall.

@cretz cretz added the help wanted Extra attention is needed label Jun 13, 2021
papr8ka pushed a commit to papr8ka/bine that referenced this issue Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants