client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var D_CachePingRecordLen = 8
View Source
var DefaultDialConn conn.FDialConn

Functions

This section is empty.

Types

type Client

type Client struct {
	Config    *ClientConfig
	FDialConn conn.FDialConn
	FRecvChan conn.FRecvChan

	Conn conn.Connection

	CBOnNetClosed func(*Client)
	// contains filtered or unexported fields
}

func (*Client) Armour added in v0.1.0

func (c *Client) Armour() conn.Armour

func (*Client) BindArmour added in v0.1.0

func (c *Client) BindArmour(a conn.Armour)

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect added in v0.1.0

func (c *Client) Connect() error

func (*Client) Done added in v0.1.0

func (c *Client) Done() <-chan struct{}

func (*Client) ID added in v0.1.0

func (c *Client) ID() uint64

func (*Client) LoadSignInRsp added in v0.1.0

func (c *Client) LoadSignInRsp(rsp *protocol.SignInRsp)

func (*Client) OnNetClosed added in v0.1.0

func (c *Client) OnNetClosed()

func (*Client) RecvChan added in v0.1.0

func (c *Client) RecvChan() <-chan *protocol.Packet

func (*Client) Send

func (c *Client) Send(msg protocol.Message) error

func (*Client) Sender added in v0.1.0

func (c *Client) Sender() *conn.Sender

func (*Client) Status

func (c *Client) Status() *ClientStatus

type ClientConfig

type ClientConfig struct {
	Conn interface{}
}

type ClientStatus

type ClientStatus struct {
	PingMS int64 `json:"pingMS,omitempty"`
	// contains filtered or unexported fields
}

func NewClientStatus

func NewClientStatus() *ClientStatus

func (*ClientStatus) MergePingMS added in v0.1.0

func (cs *ClientStatus) MergePingMS(ms int64)

Jump to

Keyboard shortcuts

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