iotex-core: github.com/iotexproject/iotex-core/p2p/node Index | Files

package node

import "github.com/iotexproject/iotex-core/p2p/node"

Index

Package Files

node.go

type Node Uses

type Node struct {
    NetworkType string
    Addr        string
}

Node is the root struct to embed the network identifier

func NewNode Uses

func NewNode(n string, addr string) *Node

NewNode creates an instance of Peer

func NewTCPNode Uses

func NewTCPNode(addr string) *Node

NewTCPNode creates an instance of Peer with tcp transportation

func (*Node) Network Uses

func (n *Node) Network() string

Network returns the transportation layer type (tcp by default)

func (*Node) String Uses

func (n *Node) String() string

String returns the network address (127.0.0.1:0 by default)

Updated 2019-01-05. Refresh now. Tools for package owners.