Fd behind the Conn?
paul-lalonde opened this issue · comments
Paul Lalonde commented
Thanks for this great package - it does exactly what it says on the tin!
I need to pass the file descriptor to a vsock connection to a child process. Is there a straightforward way to get the fd (or an os.File) from the Conn retured from Accept?
I know my type, and am willing to type assert.
Matt Layher commented
Yep, see: https://pkg.go.dev/github.com/mdlayher/vsock#Conn.SyscallConn
This will give you access to methods that expose the file descriptor. Closing!
Paul Lalonde commented
Genius - thanks!