]> Cypherpunks repositories - gostls13.git/commitdiff
http: document that ServerConn and ClientConn are low-level
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 30 Jun 2011 01:23:38 +0000 (18:23 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 30 Jun 2011 01:23:38 +0000 (18:23 -0700)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4635081

src/pkg/http/persist.go

index 62f9ff1b54070104fe2da6c5bc0a629f90106741..78bf9058f3c32fa525debe44680d7aa98f918503 100644 (file)
@@ -24,6 +24,9 @@ var (
 // to regain control over the connection. ServerConn supports pipe-lining,
 // i.e. requests can be read out of sync (but in the same order) while the
 // respective responses are sent.
+//
+// ServerConn is low-level and should not be needed by most applications.
+// See Server.
 type ServerConn struct {
        lk              sync.Mutex // read-write protects the following fields
        c               net.Conn
@@ -211,6 +214,9 @@ func (sc *ServerConn) Write(req *Request, resp *Response) os.Error {
 // connection, while respecting the HTTP keepalive logic. ClientConn
 // supports hijacking the connection calling Hijack to
 // regain control of the underlying net.Conn and deal with it as desired.
+//
+// ClientConn is low-level and should not be needed by most applications.
+// See Client.
 type ClientConn struct {
        lk              sync.Mutex // read-write protects the following fields
        c               net.Conn