sharknado

package
v0.0.0-...-1add468 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: BSD-2-Clause, BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// Embed a net.Conn and inherit its members.
	net.Conn
	GetDummyTraffic DummyTrafficFunc
	// contains filtered or unexported fields
}

Conn implements the net.Conn interface.

func NewConn

func NewConn(conn net.Conn, getDummyTraffic DummyTrafficFunc, seed *drbg.Seed) *Conn

NewConn creates a new Sharknado connection.

func (*Conn) Read

func (sn *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (sn *Conn) Write(b []byte) (int, error)

type DummyTrafficFunc

type DummyTrafficFunc func(int) ([]byte, error)

DummyTrafficFunc must be implemented by transports that want to use sharknado. The function takes as input the number of desired dummy traffic bytes and returns a []byte slice (and an error) that is ready to be written to the wire. Needless to say, a transport must support dummy traffic to use sharknado.

Jump to

Keyboard shortcuts

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