tcp

package
v0.0.0-...-d4c7a2f Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tcp provides the internode communication network layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transport

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

Transport is the network layer for internode communications.

func NewTLSTransport

func NewTLSTransport(certFile, keyPath string, skipVerify bool) *Transport

NewTLSTransport returns an initialized TLS-ecrypted Transport.

func NewTransport

func NewTransport() *Transport

NewTransport returns an initialized unecrypted Transport.

func (*Transport) Accept

func (t *Transport) Accept() (net.Conn, error)

Accept waits for the next connection.

func (*Transport) Addr

func (t *Transport) Addr() net.Addr

Addr returns the binding address of the transport.

func (*Transport) Close

func (t *Transport) Close() error

Close closes the transport

func (*Transport) Dial

func (t *Transport) Dial(addr string, timeout time.Duration) (net.Conn, error)

Dial opens a network connection.

func (*Transport) Open

func (t *Transport) Open(addr string) error

Open opens the transport, binding to the supplied address.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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