quic

package
v0.16.14 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(destination, name string, i *identity.TokenId, timeout time.Duration) (transport.Connection, error)

Dial a connection over QUIC.

func Listen

func Listen(bindAddress, name string, i *identity.TokenId, incoming chan transport.Connection) (io.Closer, error)

Types

type AddressParser

type AddressParser struct{}

func (AddressParser) Parse

func (ap AddressParser) Parse(addressString string) (transport.Address, error)

type Connection

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

Connection represents a concrete QUIC connection.

func (*Connection) ClearReadTimeout

func (self *Connection) ClearReadTimeout() error

ClearReadTimeout clears the read time for all current and future reads

func (*Connection) ClearWriteTimeout

func (self *Connection) ClearWriteTimeout() error

ClearWriteTimeout clears the write timeout for all current and future writes

func (*Connection) Close

func (self *Connection) Close() error

Close method on the transport.Connection interface.

func (*Connection) Conn

func (self *Connection) Conn() net.Conn

QUIC doesn't provide an underlying net.Conn

func (*Connection) Detail

func (self *Connection) Detail() *transport.ConnectionDetail

func (*Connection) PeerCertificates

func (self *Connection) PeerCertificates() []*x509.Certificate

func (*Connection) Reader

func (self *Connection) Reader() io.Reader

Reader method on the transport.Connection interface.

func (*Connection) SetReadTimeout

func (self *Connection) SetReadTimeout(t time.Duration) error

SetReadTimeout sets the read timeout to the provided duration.

func (*Connection) SetWriteTimeout

func (self *Connection) SetWriteTimeout(t time.Duration) error

SetWriteTimeout sets the write timeout to the provided duration.

func (*Connection) Writer

func (self *Connection) Writer() io.Writer

Writer method on the transport.Connection interface.

Jump to

Keyboard shortcuts

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