bin_client

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinClient

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

func New

func New(addr string, userName string, password string, chProcessingData chan BinFrameTask) *BinClient

func NewByConn

func NewByConn(conn net.Conn, chProcessingData chan BinFrameTask, auth *users.Users, stat *utilities.Statistics) *BinClient

func (*BinClient) Connected

func (c *BinClient) Connected() bool

func (*BinClient) GetRemoteAddr

func (c *BinClient) GetRemoteAddr() string

func (*BinClient) LastError

func (c *BinClient) LastError() error

func (*BinClient) SendCountOfSubscribers

func (c *BinClient) SendCountOfSubscribers(channel string, count int)

func (*BinClient) SendData

func (c *BinClient) SendData(data *BinFrame)

func (*BinClient) SendDontNeedChannel

func (c *BinClient) SendDontNeedChannel(channels []string)

func (*BinClient) SendNeedChannel

func (c *BinClient) SendNeedChannel(channels []string)

func (*BinClient) SendNeedChannelOK

func (c *BinClient) SendNeedChannelOK(channels []string)

func (*BinClient) SendNeedChannels

func (c *BinClient) SendNeedChannels()

func (*BinClient) SendNoChannels

func (c *BinClient) SendNoChannels(channels []string)

func (*BinClient) SendOpenedSession

func (c *BinClient) SendOpenedSession(sessionId string)

func (*BinClient) SessionId

func (c *BinClient) SessionId() string

func (*BinClient) SetDontNeedChannel

func (c *BinClient) SetDontNeedChannel(channelId string)

func (*BinClient) SetIncomingAll

func (c *BinClient) SetIncomingAll(incomingAll bool)

func (*BinClient) SetNeedChannel

func (c *BinClient) SetNeedChannel(channelId string)

func (*BinClient) SetNeedChannelOK

func (c *BinClient) SetNeedChannelOK(channels []string)

func (*BinClient) SetNoChannels

func (c *BinClient) SetNoChannels(channels []string)

func (*BinClient) SetSession

func (c *BinClient) SetSession(sessionId string, userName string)

func (*BinClient) SetStat

func (c *BinClient) SetStat(statistics *utilities.Statistics)

func (*BinClient) Start

func (c *BinClient) Start()

func (*BinClient) Started

func (c *BinClient) Started() bool

func (*BinClient) Stat

func (c *BinClient) Stat() *utilities.Statistics

func (*BinClient) Stop

func (c *BinClient) Stop()

func (*BinClient) UserName

func (c *BinClient) UserName() string

type BinFrame

type BinFrame struct {
	Channel  string
	Password string
	Data     []byte
}

func UnmarshalBinFrame

func UnmarshalBinFrame(frameBytes []byte) (*BinFrame, error)

func (*BinFrame) Marshal

func (c *BinFrame) Marshal() ([]byte, error)

type BinFrameTask

type BinFrameTask struct {
	SessionId string
	Client    *BinClient
	Frame     *BinFrame
}

Jump to

Keyboard shortcuts

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