udt

package
v0.0.0-...-235315f Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: BSD-3-Clause Imports: 13 Imported by: 1

Documentation

Overview

Package udt provides a pure Go implementation of the UDT protocol per http://udt.sourceforge.net/doc/draft-gg-udt-03.txt.

udt does not implement all of the spec. In particular, the following are not implemented:

- Rendezvous mode - DGRAM mode (only streaming is supported)

Index

Constants

View Source
const (

	// Socket types
	// Note - these are reversed from the spec, as the C++ implementation of UDT
	// seems to have them reversed and we want to stay interoperable
	STREAM = 1
	DGRAM  = 0 // not supported!

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	_net.Conn
}

func DialUDT

func DialUDT(net string, laddress, raddress string) (conn Conn, err error)

DialUDT establishes an outbound UDT connection using the supplied net, laddr and raddr. See function net.DialUDP for a description of net, laddr and raddr.

type Listener

type Listener interface {
	// Accept waits for and returns the next connection to the Listener.
	Accept() (c _net.Conn, err error)

	// Close closes the Listener.
	// Any blocked Accept operations will be unblocked and return errors.
	Close() (err error)

	// Addr returns the Listener's network address.
	Addr() (addr _net.Addr)
}

func ListenUDT

func ListenUDT(net string, laddr string) (l Listener, err error)

ListenUDT listens for incoming UDT connections addressed to the local address laddr. See function net.ListenUDP for a description of net and laddr.

Jump to

Keyboard shortcuts

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