client

package
v0.0.0-...-71c4e10 Latest Latest
Warning

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

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

Documentation

Overview

Package client provides a reconnectable client based on gorilla/websocket

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*websocket.Conn
	// contains filtered or unexported fields
}

func (*Client) Connect

func (client *Client) Connect()

func (*Client) Dial

func (client *Client) Dial(url string, reqHeader http.Header)

func (*Client) Shutdown

func (client *Client) Shutdown(writeWait time.Duration)

Shutdown gracefully closes the connection by sending the websocket.CloseMessage. The writeWait param defines the duration before the deadline of the write operation is hit.

Jump to

Keyboard shortcuts

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