Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrOperationNotAllowed occurs when an action is attempted // on a nop object. ErrOperationNotAllowed = errors.New("operation not allowed") )
Functions ¶
func NewTransport ¶
func NewTransport(provider StreamProvider) libchan.Transport
NewTransport returns an object implementing the libchan Transport interface using a stream provider.
Types ¶
type Stream ¶
type Stream interface { io.ReadWriteCloser Headers() http.Header Reset() error }
Stream is an interface to represent a single byte stream on a multi-plexed connection with plus headers and a method to force full closure.
type StreamProvider ¶
type StreamProvider interface { NewStream(http.Header) (Stream, error) Close() error Listen() Listener }
StreamProvider is the minimal interface for creating new streams and receiving remotely created streams.
func NewSpdyStreamProvider ¶
func NewSpdyStreamProvider(conn net.Conn, server bool) (StreamProvider, error)
NewSpdyStreamProvider creates a stream provider by starting a spdy session on the given connection. The server argument is used to determine whether the spdy connection is the client or server side.
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a transport session on top of a network connection using spdy.
func (*Transport) NewSendChannel ¶
NewSendChannel creates and returns a new send channel. The receive end will get picked up on the remote end through the remote calling WaitReceiveChannel.