connection

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	Start(readHandler ReadMessageHandler, reconnectHandler ReconnectHandler) (err error)
	Send(message []byte)
}

type Local

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

func NewLocal

func NewLocal() *Local

func (*Local) Send

func (c *Local) Send(message []byte)

func (*Local) Start

func (c *Local) Start(readHandler ReadMessageHandler, reconnectHandler ReconnectHandler) (err error)

type ReadMessageHandler

type ReadMessageHandler func(message []byte) error

type ReconnectHandler added in v0.4.2

type ReconnectHandler func(success bool)

type WebSocket

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

func NewWebSocket

func NewWebSocket(wsURL string) *WebSocket

func (*WebSocket) Send

func (c *WebSocket) Send(message []byte)

func (*WebSocket) Start

func (c *WebSocket) Start(readHandler ReadMessageHandler, reconnectHandler ReconnectHandler) (err error)

Jump to

Keyboard shortcuts

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