ws

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Type MessageType `json:"type"`
	Data string      `json:"data"`
}

type MessageType

type MessageType uint8
const (
	NotDefined MessageType = iota
	Request
	Response
)

type WSConnection

type WSConnection struct {
	Messages chan Message
	// contains filtered or unexported fields
}

func NewWS

func NewWS(url string) (*WSConnection, error)

func (*WSConnection) Close

func (wsInsp *WSConnection) Close()

func (*WSConnection) Send

func (wsInsp *WSConnection) Send(msg string) error

Jump to

Keyboard shortcuts

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