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:
Fumitoshi Ukai
2012-10-10 07:45:07 +09:00
committed by Mikio Hara
parent 90b3e53501
commit 5a65403107

View File

@@ -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)
}