quic

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a QUIC client.

func NewClient

func NewClient(addr string) (*Client, error)

NewClient creates a new QUIC client.

func NewClientFromConn added in v0.0.2

func NewClientFromConn(conn *quic.Conn) *Client

func (*Client) AcceptStream

func (c *Client) AcceptStream(ctx context.Context) (*quic.Stream, error)

AcceptStream accepts a new QUIC stream. The caller controls timeout via the context.

func (*Client) Addr

func (c *Client) Addr() string

GetStreamID returns the stream ID of the client connection.

func (*Client) Close

func (c *Client) Close() error

Close closes the client connection.

func (*Client) OpenStream

func (c *Client) OpenStream() (*quic.Stream, error)

OpenStream opens a new QUIC stream.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents a QUIC server.

func NewServer

func NewServer(addr string) (*Server, error)

NewServer creates a new QUIC server.

func (*Server) Accept

func (s *Server) Accept(ctx context.Context) (*quic.Conn, error)

Accept accepts a new QUIC connection.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the address of the server.

func (*Server) Close

func (s *Server) Close() error

Close closes the server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL