quicclient

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuicClient

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

QuicClient a quic client

func NewQuicClient

func NewQuicClient(conf *QuicConfig) *QuicClient

NewQuicClient initializes a new quic client instance

func (*QuicClient) Init

func (qcc *QuicClient) Init() error

Init initializes quic client

func (*QuicClient) Notify

func (qcc *QuicClient) Notify(authInfo map[string]string)

Notify logs info

func (*QuicClient) Receive

func (qcc *QuicClient) Receive() (model.Message, error)

Receive reads the binary message through the connection

func (*QuicClient) Send

func (qcc *QuicClient) Send(message model.Message) error

Send sends the message as JSON object through the connection

func (*QuicClient) UnInit added in v1.6.1

func (qcc *QuicClient) UnInit()

UnInit closes the quic connection

type QuicConfig

type QuicConfig struct {
	Addr             string
	CaFilePath       string
	CertFilePath     string
	KeyFilePath      string
	HandshakeTimeout time.Duration
	ReadDeadline     time.Duration
	WriteDeadline    time.Duration
	NodeID           string
	ProjectID        string
}

QuicConfig config for quic

Jump to

Keyboard shortcuts

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