Documentation
¶
Index ¶
- type Atomic
- type AtomicTime
- type QStream
- func (s *QStream) CancelRead(code quic.StreamErrorCode)
- func (s *QStream) CancelWrite(code quic.StreamErrorCode)
- func (s *QStream) Close() error
- func (s *QStream) Context() context.Context
- func (s *QStream) Read(p []byte) (n int, err error)
- func (s *QStream) SetDeadline(t time.Time) error
- func (s *QStream) SetReadDeadline(t time.Time) error
- func (s *QStream) SetWriteDeadline(t time.Time) error
- func (s *QStream) StreamID() quic.StreamID
- func (s *QStream) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Atomic ¶
type Atomic[T any] struct { // contains filtered or unexported fields }
func (*Atomic[T]) CompareAndSwap ¶
type AtomicTime ¶
type AtomicTime struct {
// contains filtered or unexported fields
}
func NewAtomicTime ¶
func NewAtomicTime(t time.Time) *AtomicTime
func (*AtomicTime) Get ¶
func (t *AtomicTime) Get() time.Time
func (*AtomicTime) Set ¶
func (t *AtomicTime) Set(new time.Time)
type QStream ¶
type QStream struct {
Stream quic.Stream
}
QStream is a wrapper of quic.Stream that handles Close() in a way that makes more sense to us. By default, quic.Stream's Close() only closes the write side of the stream, not the read side. And if there is unread data, the stream is not really considered closed until either the data is drained or CancelRead() is called. References: - https://github.com/libp2p/go-libp2p/blob/master/p2p/transport/quic/stream.go - https://github.com/quic-go/quic-go/issues/3558 - https://github.com/quic-go/quic-go/issues/1599
func (*QStream) CancelRead ¶
func (s *QStream) CancelRead(code quic.StreamErrorCode)
func (*QStream) CancelWrite ¶
func (s *QStream) CancelWrite(code quic.StreamErrorCode)
Click to show internal directories.
Click to hide internal directories.