From 929912b57ac3821c55490a7421279d071d537612 Mon Sep 17 00:00:00 2001 From: Alan Shreve Date: Wed, 6 Nov 2013 12:25:35 +0200 Subject: [PATCH] fix Write() method delegation and add function docs --- http.go | 4 +++- tls.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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)