add LocalAddr and RemoteAddr functions to http3.StreamCreator (#3384)

This commit is contained in:
Marten Seemann 2022-04-16 14:09:01 +01:00 committed by GitHub
parent 21160a02ff
commit 6d4a694183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
"net"
"github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go"
) )
@ -13,6 +14,8 @@ type StreamCreator interface {
OpenStreamSync(context.Context) (quic.Stream, error) OpenStreamSync(context.Context) (quic.Stream, error)
OpenUniStream() (quic.SendStream, error) OpenUniStream() (quic.SendStream, error)
OpenUniStreamSync(context.Context) (quic.SendStream, error) OpenUniStreamSync(context.Context) (quic.SendStream, error)
LocalAddr() net.Addr
RemoteAddr() net.Addr
} }
var _ StreamCreator = quic.Connection(nil) var _ StreamCreator = quic.Connection(nil)