Skip to content

Commit 3ff3320

Browse files
stevenscott89garyburd
stevenscott89
authored andcommitted
Improve server subprotocol documentation
Partial fix for 404.
1 parent 5ed622c commit 3ff3320

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ type Upgrader struct {
3434
ReadBufferSize, WriteBufferSize int
3535

3636
// Subprotocols specifies the server's supported protocols in order of
37-
// preference. If this field is set, then the Upgrade method negotiates a
37+
// preference. If this field is not nil, then the Upgrade method negotiates a
3838
// subprotocol by selecting the first match in this list with a protocol
39-
// requested by the client.
39+
// requested by the client. If there's no match, then no protocol is
40+
// negotiated (the Sec-Websocket-Protocol header is not included in the
41+
// handshake response).
4042
Subprotocols []string
4143

4244
// Error specifies the function for generating HTTP error responses. If Error

0 commit comments

Comments
 (0)