tcp

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: BlueOak-1.0.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteNodeConfig

type RemoteNodeConfig struct {
	URL  string `json:"url"`
	Cert []byte `json:"cert"`
}

type Server

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

Server handles HTTP, HTTPS, WebSockets, and Tor communications protocols.

func NewServer

func NewServer(cfg *comms.RPCConfig, t TankaCore, log dex.Logger) (*Server, error)

func (*Server) Connect

func (s *Server) Connect(ctx context.Context) (*sync.WaitGroup, error)

func (*Server) ConnectBootNode

func (s *Server) ConnectBootNode(
	ctx context.Context,
	rawCfg json.RawMessage,
	handleMessage func(cl tanka.Sender, msg *msgjson.Message),
	disconnect func(),
) (tanka.Sender, error)

type TankaCore

type TankaCore interface {
	// Config() *mj.TatankaConfig
	Routes() []string
	HandleMessage(tanka.Sender, *msgjson.Message) *msgjson.Error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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