(protocols ...string)
| 67 | } |
| 68 | |
| 69 | func (d *dialer) Dial(protocols ...string) (httpstream.Connection, string, error) { |
| 70 | req, err := http.NewRequest(d.method, d.url.String(), nil) |
| 71 | if err != nil { |
| 72 | return nil, "", fmt.Errorf("error creating request: %v", err) |
| 73 | } |
| 74 | return Negotiate(d.upgrader, d.client, req, protocols...) |
| 75 | } |
| 76 | |
| 77 | // Negotiate opens a connection to a remote server and attempts to negotiate |
| 78 | // a SPDY connection. Upon success, it returns the connection and the protocol selected by |