spdy: github.com/kr/spdy Index | Files | Directories

package spdy

import "github.com/kr/spdy"

Package spdy implements the SPDY protocol's HTTP layer.

Index

Package Files

conn.go doc.go request.go response.go server.go transfer.go

func ListenAndServeTLS Uses

func ListenAndServeTLS(addr, certFile, keyFile string, h http.Handler) error

ListenAndServeTLS is like http.ListenAndServeTLS, but serves both HTTP and SPDY.

func ReadRequest Uses

func ReadRequest(h, t http.Header, r io.Reader) (*http.Request, error)

ReadRequest reads an HTTP request. The header is taken from h, which must include the SPDY-specific fields starting with ':'. If r is not nil, the body will be read from r. If t is not nil, the trailer will be taken from t after the body is finished.

func ReadResponse Uses

func ReadResponse(h, t http.Header, r io.Reader, req *http.Request) (*http.Response, error)

ReadResponse reads an HTTP response. The header is taken from h, which must include the SPDY-specific fields starting with ':'. If r is not nil, the body will be read from r. If t is not nil, the trailer will be taken from t after the body is finished.

func RequestFramingHeader Uses

func RequestFramingHeader(r *http.Request) (http.Header, framing.ControlFlags, error)

RequestFramingHeader copies r into a header suitable for use in the SPDY framing layer. It includes the SPDY-specific ':' fields such as :scheme, :method, and :version.

type Conn Uses

type Conn struct {
    Conn net.Conn
    // contains filtered or unexported fields
}

Conn represents a SPDY client connection. It implements http.RoundTripper for making HTTP requests.

func (*Conn) RoundTrip Uses

func (c *Conn) RoundTrip(r *http.Request) (*http.Response, error)

RoundTrip implements interface http.RoundTripper.

type Server Uses

type Server struct {
    http.Server
}

func (*Server) ListenAndServeTLS Uses

func (s *Server) ListenAndServeTLS(certFile, keyFile string) error

ListenAndServeTLS is like http.Server.ListenAndServeTLS, but serves both HTTP and SPDY.

func (*Server) ServeConn Uses

func (s *Server) ServeConn(c net.Conn) error

ServeConn serves incoming SPDY requests on c. Most people don't need this; they should use ListenAndServeTLS instead.

Directories

PathSynopsis
spdyframingPackage spdyframing implements the SPDY protocol (currently SPDY/3), described in http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3.

Package spdy imports 13 packages (graph) and is imported by 2 packages. Updated 2016-07-14. Refresh now. Tools for package owners.