packet

package module
v0.0.0-...-3e4feaa Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: GPL-2.0 Imports: 7 Imported by: 7

README

stream-oriented packet connection

  • stream-oriented
  • heartbeat
  • fast shutdown
  • reliable
  • in-order
  • flow control

It uses 1-byte message to control the connection because the minimum TLV packet is 2-byte.

GoDoc

Documentation

Overview

Package packet implements stream-oriented packet connection.

The implementation splits packet-oriented connection like UDP and IP into different streams with remote address. In addition, heatbeat is sent periodically to detect whether remote is reachable.

Although timeout is not supported, every network supported by go including net.PacketConn can be converted to net.Conn with packet.Dial and packet.Listen. Network reliability remains the same; for example, UDP is still unreliable.

One-byte packet is reserved for managing streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, address string) (net.Conn, error)

Dial connects to the address on the named network.

If the network is not packet-oriented, it calls net.Dial directly.

func Listen

func Listen(network, address string) (net.Listener, error)

Listen announces on the local network address.

If the network is not packet-oriented, it calls net.Listen directly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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