mwebsockets

package
Version: v0.0.0-...-afa1830 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: AGPL-3.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 ReceivedMessage

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

ReceivedMessage ...

type Websocket

type Websocket struct {
	Websocket *websocket.Conn
	Send      chan WebsocketMessage
	Receive   chan ReceivedMessage
	Handler   chan []byte
	Interrupt chan struct{}
	EndPump   chan struct{}

	ID string
}

Websocket ...

func NewWebsocket

func NewWebsocket(
	eCtx echo.Context,
	allowedOrigins []string,
	id string,
) (*Websocket, error)

NewWebsocket ...

func (*Websocket) Close

func (ws *Websocket) Close() error

Close ...

func (*Websocket) Pump

func (ws *Websocket) Pump(eCtx echo.Context)

Pump ...

func (*Websocket) SendCloseMessage

func (ws *Websocket) SendCloseMessage() error

SendCloseMessage ...

func (*Websocket) SendMessage

func (ws *Websocket) SendMessage(kind int, msg []byte) error

SendMessage ...

type WebsocketMessage

type WebsocketMessage struct {
	Msg string
}

WebsocketMessage ...

Source Files

Jump to

Keyboard shortcuts

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