bridge

package
v0.0.0-...-67eab3e Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Address   string
	Port      int
	Conn      *fastws.Conn
	Connected bool

	ToPush []string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(address string, port int) (*Client, error)

func (*Client) Connect

func (C *Client) Connect() (err error)

func (*Client) Heartbeat

func (C *Client) Heartbeat() error

func (*Client) ProcessUnpushed

func (C *Client) ProcessUnpushed() error

func (*Client) PushData

func (C *Client) PushData(data string) error

type Server

type Server struct {
	Address   string
	Port      int
	Processor func(msg string)
}

func NewServer

func NewServer(address string, port int, processor func(msg string)) (*Server, error)

func (*Server) Serve

func (S *Server) Serve() error

Jump to

Keyboard shortcuts

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