service

package
v0.0.0-...-3fb6a18 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultListenAddr = "127.0.0.1:9001"
)

Variables

View Source
var (
	DefaultConnect = func() *net.TCPAddr {
		tcpAddr, _ := net.ResolveTCPAddr("tcp", DefaultListenAddr)
		return tcpAddr
	}
)

Functions

func Handle

func Handle(tcpConn *net.TCPConn)

func New

func New(ctx context.Context, tcpAddr *net.TCPAddr) p2pService

func PingHandle

func PingHandle(tcpConn *net.TCPConn, nodeID peer.ID)

func SSHandle

func SSHandle(tcpConn *net.TCPConn, config api.ClientConfig)

Types

type ConnHandler

type ConnHandler func(*net.TCPConn)

type Service

type Service interface {
	Start() error
	SetHandler(handle ConnHandler)
	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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