router

package
v0.0.0-...-a68bb9d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package router provides a declarative way of routing mDNS messages between networks, possibly asymmetrically.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type R

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

func (*R) Add

func (r *R) Add(upstream, downstream net.PacketConn)

The router will make the upstream conn's resources flow downstream. This results in DNS questions flowing from the downstream network to the upstream one and DNS answers flowing back downstream.

The router will close these conns on completion of Run.

func (*R) Run

func (r *R) Run(ctx context.Context) error

Listens on added connections and routes messages accordingly.

Jump to

Keyboard shortcuts

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