fastudp

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(conn *net.UDPConn) net.PacketConn

NewConn creates a new Conn.

Types

type Conn

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

Conn wraps an underlying UDPConn and batches stuff to it.

func (*Conn) Close

func (conn *Conn) Close() error

Close closes the connection.

func (*Conn) LocalAddr

func (conn *Conn) LocalAddr() net.Addr

LocalAddr returns the local address.

func (*Conn) ReadFrom

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

ReadFrom reads a packet from the connection.

func (*Conn) RemoteAddr

func (conn *Conn) RemoteAddr() net.Addr

RemoteAddr returns the remote address.

func (*Conn) SetDeadline

func (conn *Conn) SetDeadline(t time.Time) error

SetDeadline sets a deadline.

func (*Conn) SetReadDeadline

func (conn *Conn) SetReadDeadline(t time.Time) error

SetReadDeadline sets a read deadline.

func (*Conn) SetWriteDeadline

func (conn *Conn) SetWriteDeadline(t time.Time) error

SetWriteDeadline sets a write deadline.

func (*Conn) WriteTo

func (conn *Conn) WriteTo(p []byte, addr net.Addr) (n int, err error)

WriteTo writes to a given address.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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