mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
go.net/websocket: Use protocol parameter in websocket.Dial.
Fixes golang/go#4157 R=golang-dev, rsc, mikioh.mikioh CC=golang-dev https://golang.org/cl/6571064
This commit is contained in:
committed by
Mikio Hara
parent
90b3e53501
commit
5a65403107
@@ -70,6 +70,9 @@ func Dial(url_, protocol, origin string) (ws *Conn, err error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if protocol != "" {
|
||||
config.Protocol = []string{protocol}
|
||||
}
|
||||
return DialConfig(config)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user