Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
// Delimiter is used to frame messages (default: "\n\n\n")
Delimiter []byte
// ReadTimeout is the timeout for read operations
ReadTimeout time.Duration
// WriteTimeout is the timeout for write operations
WriteTimeout time.Duration
// BufferSize is the size of the read buffer
BufferSize int
// ProtocolConfig holds protocol-specific configuration
ProtocolConfig interface{}
}
ClientConfig holds common configuration for all protocol clients
func DefaultConfig ¶
func DefaultConfig() *ClientConfig
DefaultConfig returns a ClientConfig with default values
type QUICClient ¶
type QUICClient struct {
// contains filtered or unexported fields
}
QUICClient implements a QUIC connection client
func NewQUICClient ¶
func NewQUICClient(addr string, config *ClientConfig) (*QUICClient, error)
NewQUICClient creates a new QUIC client with the given address
func (*QUICClient) Connect ¶
func (c *QUICClient) Connect(ctx context.Context) error
Connect establishes a QUIC connection
func (*QUICClient) LocalAddr ¶
func (c *QUICClient) LocalAddr() net.Addr
LocalAddr returns the local network address
func (*QUICClient) Receive ¶
func (c *QUICClient) Receive() ([]byte, error)
Receive receives data from the QUIC connection
func (*QUICClient) RemoteAddr ¶
func (c *QUICClient) RemoteAddr() net.Addr
RemoteAddr returns the remote network address
func (*QUICClient) Send ¶
func (c *QUICClient) Send(data []byte) error
Send sends data over the QUIC connection
type QUICConfig ¶
Protocol-specific configurations
type UDPClient ¶
type UDPClient struct {
// contains filtered or unexported fields
}
UDPClient implements a UDP connection client
func NewUDPClient ¶
func NewUDPClient(addr string, config *ClientConfig) (*UDPClient, error)
NewUDPClient creates a new UDP client with the given address
func (*UDPClient) RemoteAddr ¶
RemoteAddr returns the remote network address