const HeaderSpdy31 … type responseUpgrader … type connWrapper … func (w *connWrapper) Read(b []byte) (n int, err error) { … } func (w *connWrapper) Close() error { … } // NewResponseUpgrader returns a new httpstream.ResponseUpgrader that is // capable of upgrading HTTP responses using SPDY/3.1 via the // spdystream package. func NewResponseUpgrader() httpstream.ResponseUpgrader { … } // NewResponseUpgraderWithPings returns a new httpstream.ResponseUpgrader that // is capable of upgrading HTTP responses using SPDY/3.1 via the spdystream // package. // // If pingPeriod is non-zero, for each incoming connection a background // goroutine will send periodic Ping frames to the server. Use this to keep // idle connections through certain load balancers alive longer. func NewResponseUpgraderWithPings(pingPeriod time.Duration) httpstream.ResponseUpgrader { … } // UpgradeResponse upgrades an HTTP response to one that supports multiplexed // streams. newStreamHandler will be called synchronously whenever the // other end of the upgraded connection creates a new stream. func (u responseUpgrader) UpgradeResponse(w http.ResponseWriter, req *http.Request, newStreamHandler httpstream.NewStreamHandler) httpstream.Connection { … }