transport

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package transport defines the Transport interface and provides a net-based implementation that can be used by zmq4 sockets to exchange messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Dialer is the interface that wraps the DialContext method.

type Transport

type Transport interface {
	// Dial connects to the address on the named network using the provided
	// context.
	Dial(ctx context.Context, dialer Dialer, addr string) (net.Conn, error)

	// Listen announces on the provided network address.
	Listen(ctx context.Context, addr string) (net.Listener, error)

	// Addr returns the end-point address.
	Addr(ep string) (addr string, err error)
}

Transport is the zmq4 transport interface that wraps the Dial and Listen methods.

func New

func New(network string) Transport

New returns a new net-based transport with the given network (e.g "tcp").

Jump to

Keyboard shortcuts

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