Skip to content

Commit b4b5d88

Browse files
authored
Document the allowed concurrency on Upgrader and Dialer (#636)
* Document allowed concurrency on Dialer. * Document allowed concurrency on Upgrader.
1 parent e8629af commit b4b5d88

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS
4848
}
4949

5050
// A Dialer contains options for connecting to WebSocket server.
51+
//
52+
// It is safe to call Dialer's methods concurrently.
5153
type Dialer struct {
5254
// NetDial specifies the dial function for creating TCP connections. If
5355
// NetDial is nil, net.Dial is used.

server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ func (e HandshakeError) Error() string { return e.message }
2323

2424
// Upgrader specifies parameters for upgrading an HTTP connection to a
2525
// WebSocket connection.
26+
//
27+
// It is safe to call Upgrader's methods concurrently.
2628
type Upgrader struct {
2729
// HandshakeTimeout specifies the duration for the handshake to complete.
2830
HandshakeTimeout time.Duration

0 commit comments

Comments
 (0)