Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TextMessage   int = websocket.TextMessage
	BinaryMessage     = websocket.BinaryMessage
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Receive chan Message
	Send    chan Message
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) Connect

func (c *Client) Connect(ctx context.Context, to, token string)

type Message

type Message struct {
	Content []byte
	Type    int // TextMessage or BinaryMessage
}

Jump to

Keyboard shortcuts

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