Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View 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
}