client

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PingInterval = 5 * time.Second
	PingWait     = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg Config) (*Client, error)

func (*Client) Listen

func (c *Client) Listen(ctx context.Context) error

func (*Client) OnClose added in v0.0.19

func (c *Client) OnClose(socket *gws.Conn, err error)

func (*Client) OnMessage added in v0.0.19

func (c *Client) OnMessage(socket *gws.Conn, wsmsg *gws.Message)

func (*Client) OnOpen added in v0.0.19

func (c *Client) OnOpen(socket *gws.Conn)

func (*Client) OnPing added in v0.0.19

func (c *Client) OnPing(socket *gws.Conn, payload []byte)

func (*Client) OnPong added in v0.0.19

func (c *Client) OnPong(socket *gws.Conn, payload []byte)

type Config

type Config struct {
	Target      string
	Server      string
	Path        string
	AccessToken string
}

type HostPost

type HostPost struct {
	Host string
	Port string
}

func (*HostPost) HttpScheme

func (h *HostPost) HttpScheme() string

func (*HostPost) String

func (h *HostPost) String() string

type WebSocket added in v0.0.19

type WebSocket struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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