stream.go 622 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package libp2pquic

import (
	"time"

	smux "github.com/jbenet/go-stream-muxer"
	quic "github.com/lucas-clemente/quic-go"
)

// The quicStream is a very thin wrapper for a quic.Stream, adding some methods
// required to fulfill the smux.Stream interface
// TODO: this can be removed once the quic.Stream supports deadlines (quic-go#514)
type quicStream struct {
	quic.Stream
}

var _ smux.Stream = &quicStream{}

func (s *quicStream) SetDeadline(time.Time) error {
	return nil
}

func (s *quicStream) SetReadDeadline(time.Time) error {
	return nil
}

func (s *quicStream) SetWriteDeadline(time.Time) error {
	return nil
}