diff --git a/http.go b/http.go index 52350a6..d491fc0 100644 --- a/http.go +++ b/http.go @@ -8,9 +8,11 @@ import ( type HTTPConn struct { *sharedConn - *http.Request + Request *http.Request } +// HTTP parses the head of the first HTTP request on conn and returns +// a new, unread connection with metadata for virtual host muxing func HTTP(conn net.Conn) (httpConn *HTTPConn, err error) { c, rd := newShared(conn) diff --git a/tls.go b/tls.go index 5dc83ab..7e28b15 100644 --- a/tls.go +++ b/tls.go @@ -79,9 +79,11 @@ const ( // It implements the net.Conn interface. type TLSConn struct { *sharedConn - *ClientHelloMsg + ClientHelloMsg *ClientHelloMsg } +// TLS parses the ClientHello message on conn and returns +// a new, unread connection with metadata for virtual host muxing func TLS(conn net.Conn) (tlsConn *TLSConn, err error) { c, rd := newShared(conn)