|author||Lluis Campos <firstname.lastname@example.org>||Tue Jan 04 01:59:52 2022|
|committer||GitHub <email@example.com>||Tue Jan 04 01:59:52 2022|
Dialer: add optional method NetDialTLSContext (#746) Fixes issue: https://github.com/gorilla/websocket/issues/745 With the previous interface, NetDial and NetDialContext were used for both TLS and non-TLS TCP connections, and afterwards TLSClientConfig was used to do the TLS handshake. While this API works for most cases, it prevents from using more advance authentication methods during the TLS handshake, as this is out of the control of the user. This commits introduces another a new dial method, NetDialTLSContext, which is used when dialing for TLS/TCP. The code then assumes that the handshake is done there and TLSClientConfig is not used. This API change is fully backwards compatible and it better aligns with net/http.Transport API, which has these two dial flavors. See: https://pkg.go.dev/net/http#Transport Signed-off-by: Lluis Campos <firstname.lastname@example.org>
The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol. The package API is stable.
go get github.com/gorilla/websocket