fakenet

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fakenet contains fake network abstractions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketConn

type PacketConn struct {
	net.Conn
}

PacketConn wraps a net.Conn and emulates net.PacketConn

func (*PacketConn) ReadFrom

func (f *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

ReadFrom reads a packet from the connection,

func (*PacketConn) WriteTo

func (f *PacketConn) WriteTo(p []byte, _ net.Addr) (int, error)

WriteTo writes a packet with payload p to addr.

Jump to

Keyboard shortcuts

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