Skip to content

Commit

Permalink
Document the allowed concurrency on Upgrader and Dialer (#636)
Browse files Browse the repository at this point in the history
* Document allowed concurrency on Dialer.
* Document allowed concurrency on Upgrader.
  • Loading branch information
garyburd committed Dec 16, 2021
1 parent e8629af commit b4b5d88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client.go
Expand Up @@ -48,6 +48,8 @@ func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufS
}

// A Dialer contains options for connecting to WebSocket server.
//
// It is safe to call Dialer's methods concurrently.
type Dialer struct {
// NetDial specifies the dial function for creating TCP connections. If
// NetDial is nil, net.Dial is used.
Expand Down
2 changes: 2 additions & 0 deletions server.go
Expand Up @@ -23,6 +23,8 @@ func (e HandshakeError) Error() string { return e.message }

// Upgrader specifies parameters for upgrading an HTTP connection to a
// WebSocket connection.
//
// It is safe to call Upgrader's methods concurrently.
type Upgrader struct {
// HandshakeTimeout specifies the duration for the handshake to complete.
HandshakeTimeout time.Duration
Expand Down

0 comments on commit b4b5d88

Please sign in to comment.