Initial commit (code only without large binaries)
This commit is contained in:
43
EdgeNode/internal/http3/conn.go
Normal file
43
EdgeNode/internal/http3/conn.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
//go:build plus
|
||||
|
||||
package http3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/quic-go/quic-go"
|
||||
"net"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Conn interface {
|
||||
SetParentConn(parentConn Conn)
|
||||
SetNotifier(notifier Notifier)
|
||||
AcceptStream(ctx context.Context) (quic.Stream, error)
|
||||
AcceptUniStream(ctx context.Context) (quic.ReceiveStream, error)
|
||||
OpenStream() (quic.Stream, error)
|
||||
OpenStreamSync(ctx context.Context) (quic.Stream, error)
|
||||
OpenUniStream() (quic.SendStream, error)
|
||||
OpenUniStreamSync(ctx context.Context) (quic.SendStream, error)
|
||||
LocalAddr() net.Addr
|
||||
RemoteAddr() net.Addr
|
||||
CloseWithError(errCode quic.ApplicationErrorCode, errMsg string) error
|
||||
Context() context.Context
|
||||
ConnectionState() quic.ConnectionState
|
||||
SendDatagram(b []byte) error
|
||||
ReceiveDatagram(ctx context.Context) ([]byte, error)
|
||||
HandshakeComplete() <-chan struct{}
|
||||
NextConnection() quic.Connection
|
||||
|
||||
notifier() (notifier Notifier)
|
||||
callContextFunc(ctx context.Context) context.Context
|
||||
|
||||
// net.Conn
|
||||
|
||||
Read(b []byte) (n int, err error)
|
||||
Write(b []byte) (n int, err error)
|
||||
Close() error
|
||||
SetDeadline(t time.Time) error
|
||||
SetReadDeadline(t time.Time) error
|
||||
SetWriteDeadline(t time.Time) error
|
||||
}
|
||||
Reference in New Issue
Block a user