stream.go 315 Bytes
Newer Older
1
2
3
4
package libp2pquic

import (
	smux "github.com/libp2p/go-stream-muxer"
5
	quic "github.com/lucas-clemente/quic-go"
6
7
8
9
10
11
12
13
14
)

type stream struct {
	quic.Stream
}

var _ smux.Stream = &stream{}

func (s *stream) Reset() error {
15
16
17
18
	if err := s.Stream.CancelRead(0); err != nil {
		return err
	}
	return s.Stream.CancelWrite(0)
19
}