connection

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0, BSD-3-Clause-Clear Imports: 1 Imported by: 0

Documentation

Overview

Package connection encapsulates connection creation process and provides connection factories.

Usage

factory := connection.NewConnectionFactory()

connection := factory.create("127.0.0.1:8080")
defer connection.close()  // You have to manually close connection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	Create(address string) (net.PacketConn, error)
}

Factory allows to create new connections.

func NewConnectionFactory

func NewConnectionFactory() Factory

NewConnectionFactory returns default UDP connection.

Jump to

Keyboard shortcuts

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