connection

package
v0.0.0-...-c7121e3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 4 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(handler ReadMessageHandler) bool
	Send(message []byte)
}

type Local

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

func NewLocal

func NewLocal(readCh chan []byte, writeCh chan []byte) *Local

func (*Local) Send

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

func (*Local) Start

func (c *Local) Start(handler ReadMessageHandler) bool

type ReadMessageHandler

type ReadMessageHandler func(message []byte) error

type WebSocket

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

func NewWebSocket

func NewWebSocket(conn *websocket.Conn) *WebSocket

func (*WebSocket) Send

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

func (*WebSocket) Start

func (c *WebSocket) Start(handler ReadMessageHandler) bool

Jump to

Keyboard shortcuts

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