testutils

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeAckFrame

func ComposeAckFrame(smallest protocol.PacketNumber, largest protocol.PacketNumber) *wire.AckFrame

ComposeAckFrame returns a new Ack Frame that acknowledges all packets between smallest and largest

func ComposeConnCloseFrame

func ComposeConnCloseFrame() *wire.ConnectionCloseFrame

ComposeConnCloseFrame returns a new Connection Close frame with a generic error

func ComposeCryptoFrame

func ComposeCryptoFrame(cft CryptoFrameType, size int) *wire.CryptoFrame

ComposeCryptoFrame returns a new empty crypto frame of the specified type padded to size bytes with zeroes

func ComposeInitialPacket

func ComposeInitialPacket(srcConnID protocol.ConnectionID, destConnID protocol.ConnectionID, version protocol.VersionNumber, key protocol.ConnectionID, frames []wire.Frame) []byte

ComposeInitialPacket returns an Initial packet encrypted under key (the original destination connection ID) containing specified frames

func ComposeRetryPacket

func ComposeRetryPacket(
	srcConnID protocol.ConnectionID,
	destConnID protocol.ConnectionID,
	origDestConnID protocol.ConnectionID,
	token []byte,
	version protocol.VersionNumber,
) []byte

ComposeRetryPacket returns a new raw Retry Packet

Types

type CryptoFrameType

type CryptoFrameType uint8

CryptoFrameType uses same types as messageType in crypto_setup.go

Jump to

Keyboard shortcuts

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