ethrouter

package
v0.0.0-...-bd00acd Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(eg *errgroup.Group, tun2EthQ chan Packet, eth2TunQ chan []byte) error

ethrouter.Run: spawns 2 goroutines for ethrouter.writer and ethrouter.reader properly routes each channel to their respective goroutine. writer gets the writeq and reader gets the eth2TunQ. Also creates the socket that they share TODO look into more ergonomic way to initialize gorountines and pass around channels

Types

type Packet

type Packet struct {
	Addr    *net.UDPAddr
	Payload []byte
}

ethrouter.Packet: outgoing packet contains the address of where its going to be sent do and a payload TODO: find a better place to put this or a better name

Jump to

Keyboard shortcuts

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