client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL *url.URL

	CallbackFunc func(*msg.Message)
	// contains filtered or unexported fields
}

Client websocket client

func Connect

func Connect(wsurl string, callback func(*msg.Message), authMsg *msg.AuthReq, topics []string, receiverBufferSize, pingWait, readWait, writeWait int) (*Client, error)

Connect create a new websocket client and connect to server

func (*Client) Close

func (c *Client) Close()

Close client

func (*Client) Publish

func (c *Client) Publish(message *msg.Message) bool

Publish one message

func (*Client) Run

func (c *Client) Run()

Run client

Jump to

Keyboard shortcuts

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