Documentation ¶
Index ¶
- Constants
- func Listen(ctx context.Context, network, address string, config *Config) (net.Listener, error)
- func ListenURL(ctx context.Context, listenURL *url.URL, config *Config) (net.Listener, error)
- func MayPerformXConnHandshake(Raw net.Conn) error
- func NewXDialerProtocol(UnderlyingDialer client.DialerContext, XConfig *Config) client.Protocol
- func ValidateCryptoConnURL(Raw net.Conn, URL *url.URL) bool
- type Config
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) ConsumeBuffer(ba *bufferio.BufferArray) error
- func (c *Conn) GetExtensionProperty() map[string]uint64
- func (c *Conn) Handshake() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) ProduceBuffer(bs *bufferio.BufferArray, startOffset int) error
- func (c *Conn) Read(b []byte) (int, error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (*Conn) SupportBufferIO() bool
- func (c *Conn) SupportKeepAlive() bool
- func (c *Conn) Write(b []byte) (int, error)
- func (c *Conn) WriteTo(writer io.Writer) (int64, error)
Constants ¶
View Source
const (
PacketByteLimit = 1 << 25
)
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func ListenURL ¶
Types ¶
type Config ¶
type Config struct { AuthFunc func(string, ed25519.PublicKey) bool TraceFunc util.TracerFunc AuthPrivateKey ed25519.PrivateKey KeepaliveInterval time.Duration HandshakeTimeout time.Duration HandshakeServerAllowPublic bool // FECParityNum specifies the number of parity shards in every 16 packets. 0 means disabled. FECParityNum int // If enabled, a separate routine will do the actual IO. // This only affects the behavior of UDP connection. EnableAIO bool }
Click to show internal directories.
Click to hide internal directories.