udp

package
v1.0.1-0...-c50d641 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package udp provides a connection-oriented listener over a UDP PacketConn

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn augments a connection-oriented connection over a UDP PacketConn

func (*Conn) Close

func (c *Conn) Close() error

Close closes the conn and releases any Read calls

func (*Conn) LocalAddr

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

LocalAddr implements net.Conn.LocalAddr

func (*Conn) Read

func (c *Conn) Read(p []byte) (int, error)

Read

func (*Conn) RemoteAddr

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

RemoteAddr implements net.Conn.RemoteAddr

func (*Conn) SetDeadline

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

SetDeadline implements net.Conn.SetDeadline

func (*Conn) SetReadDeadline

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

SetReadDeadline implements net.Conn.SetDeadline

func (*Conn) SetWriteDeadline

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

SetWriteDeadline implements net.Conn.SetDeadline

func (*Conn) Write

func (c *Conn) Write(p []byte) (n int, err error)

Write writes len(p) bytes from p to the DTLS connection

type Listener

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

Listener augments a connection-oriented Listener over a UDP PacketConn

func Listen

func Listen(network string, laddr *net.UDPAddr) (*Listener, error)

Listen creates a new listener

func (*Listener) Accept

func (l *Listener) Accept() (*Conn, error)

Accept waits for and returns the next connection to the listener.

func (*Listener) Addr

func (l *Listener) Addr() net.Addr

Addr returns the listener's network address.

func (*Listener) Close

func (l *Listener) Close() error

Close closes the listener. Any blocked Accept operations will be unblocked and return errors.

Jump to

Keyboard shortcuts

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