net: add support for FileConn, FilePacketConn, FileListener on windows #9503
Comments
CL https://golang.org/cl/8683 mentions this issue. |
mattn
added a commit
to mattn/go
that referenced
this issue
Apr 24, 2018
…tConn, FileListener DO NOT REVIEW Fixes golang#9503. Fixes golang#10350. Change-Id: If0851cb3340281cc1ea523cd0ddf48fc7f87c775
This issue might be unfixable because of the architectural differences between Unix-variants and Windows. One good news is that Go 1.12 supports #24331; you may use os.File.SyscallConn instead of net.File{Conn,PacketConn,Listener} functions. |
@mikioh I've been trying to wrap a
But of course this doesn't work because of this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue for discussion.
FileListener is useful to implement graceful-restart server. ex: https://github.com/lestrrat/go-server-starter
I know windows doesn't have a way to pass FDs to external process like UNIX OSs.
But it's not impossible. WSADuplicateSocket can export intormation of file descriptor as WSAPROTOCOL_INFO to specified process. This structure is possible to be written to a file as byte array.
http://msdn.microsoft.com/ja-jp/library/windows/desktop/ms741565(v=vs.85).aspx
How about implementation of os.File.dup, os.FileListener on windows?
https://codereview.appspot.com/177590043/
The text was updated successfully, but these errors were encountered: