quic

package
v0.0.0-...-bc3f6f8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config is a quic specyfic configuration

func NewConfig

func NewConfig(pathToTLSCert string, pathToTLSKey string, handshakeTimeout time.Duration, serverName string) Config

NewConfig creates quic configuration

func NewInsecureTestConfig

func NewInsecureTestConfig() Config

NewInsecureTestConfig creates config for testing prupose, node with this quic configuration won't verify server's certificate chain and host name

type Network

type Network struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Network is a handel.Network implementation using QUIC as its transport layer

func NewNetwork

func NewNetwork(addr string, enc network.Encoding, cfg Config) (*Network, error)

NewNetwork creates Nework baked by QUIC protocol

func (*Network) RegisterListener

func (quicNet *Network) RegisterListener(listener h.Listener)

RegisterListener registers listener for processing incoming packets

func (*Network) Send

func (quicNet *Network) Send(identities []h.Identity, packet *h.Packet)

Send sends a packet to supplied identities

func (*Network) Stop

func (quicNet *Network) Stop()

Stop stops the network

Jump to

Keyboard shortcuts

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