Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Negotiate ¶
func Negotiate(upgrader Upgrader, client *http.Client, req *http.Request, protocols ...string) (httpstream.Connection, string, error)
Negotiate opens a connection to a remote server and attempts to negotiate a SPDY connection. Upon success, it returns the connection and the protocol selected by the server. The client transport must use the upgradeRoundTripper - see RoundTripperFor.
Types ¶
type Upgrader ¶
type Upgrader interface { // NewConnection validates the response and creates a new Connection. NewConnection(resp *http.Response) (httpstream.Connection, error) }
Upgrader validates a response from the server after a SPDY upgrade.
func RoundTripperFor ¶
func RoundTripperFor() (http.RoundTripper, Upgrader, error)
RoundTripperFor returns a round tripper and upgrader to use with SPDY.
Click to show internal directories.
Click to hide internal directories.