ntransport

package module
v0.0.0-...-d4e77be Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

nkn-client-nnet-transport

Use NKN MultiClient session as nnet transport layer. It's recommended to use MultiClient with only one client and the same ID (sha256 of client address) as nnet ID for better routing efficiency.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NKNTransport

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

NKNTransport is the transport layer based on NKN client

func NewNKNTransport

func NewNKNTransport(m *nkn.MultiClient) *NKNTransport

NewNKNTransport creates a new NKN transport layer

func (*NKNTransport) Dial

func (nt *NKNTransport) Dial(addr string, dialTimeout time.Duration) (net.Conn, error)

Dial connects to the remote address on the network "nkn"

func (*NKNTransport) GetNetwork

func (nt *NKNTransport) GetNetwork() string

func (*NKNTransport) Listen

func (nt *NKNTransport) Listen(port uint16) (net.Listener, error)

func (*NKNTransport) String

func (nt *NKNTransport) String() string

Jump to

Keyboard shortcuts

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