client

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(m proto.Message) ([]byte, error)

func Unmarshal

func Unmarshal(b []byte, m proto.Message) error

Types

type Client

type Client struct {
	*http.Client
}

func (Client) Post

func (client Client) Post(ctx context.Context, url string, request, response proto.Message) (e error)

type Conn

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

func NewConn

func NewConn(ws *websocket.Conn, heart int) (conn *Conn, e error)

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, e error)

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time) error

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

type Dialer

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

func NewDialer

func NewDialer(platform, ws string, insecure bool, user, password string, heart int) (dialer *Dialer, e error)

func (*Dialer) DialContext

func (d *Dialer) DialContext(ctx context.Context, network, address string) (c net.Conn, e error)

Jump to

Keyboard shortcuts

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