On Saturday, January 26, 2013 1:57:03 AM UTC+2, minux wrote:On Sat, Jan 26, 2013 at 3:38 AM, Niklas Schnelle <niklas....@gmail.com> wrote:when reading http://0pointer.de/blog/projects/inetd.html I began to wonder how hard it would be to
support socket activation in a Go server. I couldn't find anything in the net package on how to create a XXConn from an
fd though. Is this supported? It would be kind of cool to have systemd listen on port 80 and just passing connected sockets to a Go server
especially since this also solves the problem of listening on privileged ports.
first convert the fd to *os.File via os.NewFile,and then convert the *os.File to a net.Conn via net.FileConn.