Source File
stream.go
Belonging Package
github.com/libp2p/go-libp2p/core/network
package networkimport ()// Stream represents a bidirectional channel between two agents in// a libp2p network. "agent" is as granular as desired, potentially// being a "request -> reply" pair, or whole protocols.//// Streams are backed by a multiplexer underneath the hood.type Stream interface {MuxedStream// ID returns an identifier that uniquely identifies this Stream within this// host, during this run. Stream IDs may repeat across restarts.ID() stringProtocol() protocol.IDSetProtocol(id protocol.ID) error// Stat returns metadata pertaining to this stream.Stat() Stats// Conn returns the connection this stream is part of.Conn() Conn// Scope returns the user's view of this stream's resource scopeScope() StreamScope// ResetWithError closes both ends of the stream with errCode. The errCode is sent// to the peer.ResetWithError(errCode StreamErrorCode) error}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |