tcp

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

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 inter-node communications.

func NewTLSTransport

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

NewTLSTransport returns an initialized TLS-encrypted Transport.

func NewTransport

func NewTransport() *Transport

NewTransport returns an initialized unencrypted 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.

Jump to

Keyboard shortcuts

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