I have a Conn accepted from tls.Listener:

ln, err := tls.Listen("tcp", ":443", tlsConfig)
conn, err := ln.Accpet()

So now, can I convert the conn to support http2?

I find a func in golang.org/x/net/http2: 
func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts)

It accepts a net.Conn and (maybe) can serve it as http2-conn,

s := http2.Server{}
s.ServeConn(conn, nil)

But it does not work, did I miss something ? or I am wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to