{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package spdy\n\n## Constants\n\n```go\nconst HeaderSpdy31 = \"SPDY/3.1\"\n```\n\n## Functions\n\n```go\nfunc NewClientConnection(conn net.Conn) (httpstream.Connection, error)\n```\nNewClientConnection creates a new SPDY client connection.\n\n```go\nfunc NewResponseUpgrader() httpstream.ResponseUpgrader\n```\nNewResponseUpgrader returns a new httpstream.ResponseUpgrader that is capable of upgrading HTTP responses using SPDY/3.1 via the spdystream package.\n\n```go\nfunc NewRoundTripper(tlsConfig *tls.Config) httpstream.UpgradeRoundTripper\n```\nNewRoundTripper creates a new SpdyRoundTripper that will use the specified tlsConfig.\n\n```go\nfunc NewServerConnection(conn net.Conn, newStreamHandler httpstream.NewStreamHandler) (httpstream.Connection, error)\n```\nNewServerConnection creates a new SPDY server connection. newStreamHandler will be invoked when the server receives a newly created stream from the client.\n\n## Types\n\n```go\ntype SpdyRoundTripper struct {\n\n\t// Dialer is the dialer used to connect.  Used if non-nil.\n\tDialer *net.Dialer\n\t// contains filtered or unexported fields\n}\n```\nSpdyRoundTripper knows how to upgrade an HTTP request to one that supports multiplexed streams. After RoundTrip() is invoked, Conn will be set and usable. SpdyRoundTripper implements the UpgradeRoundTripper interface.\n\n```go\nfunc NewSpdyRoundTripper(tlsConfig *tls.Config) *SpdyRoundTripper\n```\nNewSpdyRoundTripper creates a new SpdyRoundTripper that will use the specified tlsConfig. This function is mostly meant for unit tests.\n\n```go\nfunc (s *SpdyRoundTripper) NewConnection(resp *http.Response) (httpstream.Connection, error)\n```\nNewConnection validates the upgrade response, creating and returning a new httpstream.Connection if there were no errors.\n\n```go\nfunc (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)\n```\nRoundTrip executes the Request and upgrades it. After a successful upgrade, clients may call SpdyRoundTripper.Connection() to retrieve the upgraded connection.\n\n","path":"github.com/UnityTech/client-go/pkg/util/httpstream/spdy","name":"spdy","synopsis":"","isRedistributable":true}
