Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { io.Closer // IsClosed returns whether a connection is fully closed, so it can // be garbage collected. IsClosed() bool // OpenStream creates a new stream. OpenStream() (Stream, error) // Serve starts listening for incoming requests and handles them // using given StreamHandler Serve(StreamHandler) }
Conn is a stream-multiplexing connection to a remote peer.
type StreamHandler ¶
type StreamHandler func(Stream)
StreamHandler is a function that handles streams (usually those opened by the remote side)
Click to show internal directories.
Click to hide internal directories.