node

package module
v0.0.0-...-1a18390 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

README

Go-Node

Communication platform

  • Transport layer UDP
  • Transport layer security
  • Connection migration
  • Stream multiplexing
  • Named stream
  • Cluster

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Dial

func Dial(nodeAddresses ...*net.UDPAddr) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect(nodeID string) (*Stream, error)

type Listener

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

func (*Listener) Accept

func (l *Listener) Accept() (*Stream, error)

func (*Listener) Close

func (l *Listener) Close() error

type NamedStream

type NamedStream struct{}

func (*NamedStream) Close

func (s *NamedStream) Close() error

func (*NamedStream) Receive

func (s *NamedStream) Receive() ([]byte, error)

func (*NamedStream) Send

func (s *NamedStream) Send(b []byte) error

type Server

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

func Run

func Run(connectionsLimit int, address *net.UDPAddr, nodeAddresses ...*net.UDPAddr) (*Server, error)

connectionsLimit default value 2000000 if 0, max value 1000000000

func (*Server) Close

func (s *Server) Close() error

func (*Server) Listen

func (s *Server) Listen(nodeID string) (*Listener, error)

type Stream

type Stream struct{}

func (*Stream) Close

func (s *Stream) Close() error

func (Stream) MakeStream

func (s Stream) MakeStream(id string) (*NamedStream, error)

func (*Stream) Receive

func (s *Stream) Receive() ([]byte, error)

func (*Stream) Send

func (s *Stream) Send(b []byte) error

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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