Versions in this module Expand all Collapse all v0 v0.0.1 Oct 12, 2022 Changes in this version + type ActionFn func() error + type Client struct + TagName string + func New(opts ...Option) *Client + func (p *Client) AddAction(actionFn ActionFn) + func (p *Client) Codec() cfacade.IPacketCodec + func (p *Client) ConnectToTCP(addr string, tlsConfig ...*tls.Config) error + func (p *Client) ConnectToWS(addr string, path string, tlsConfig ...*tls.Config) error + func (p *Client) Disconnect() + func (p *Client) HandshakeData() *HandshakeData + func (p *Client) IsConnected() bool + func (p *Client) Notify(route string, val interface{}) error + func (p *Client) On(route string, fn OnMessageFn) + func (p *Client) Request(route string, val interface{}) (*cmsg.Message, error) + func (p *Client) Send(msgType cmsg.Type, route string, val interface{}) (uint, error) + func (p *Client) SendRaw(typ cpacket.Type, data []byte) error + func (p *Client) Serializer() cfacade.ISerializer + type HandshakeData struct + Code int + Sys HandshakeSys + type HandshakeSys struct + Dict map[string]uint16 + Heartbeat int + Serializer string + type OnMessageFn func(msg *cmsg.Message) + type Option func(options *options) + func WithErrorBreak(isBreak bool) Option + func WithHandshake(handshake string) Option + func WithHeartbeat(heartBeat int) Option + func WithPacketCodec(codec cfacade.IPacketCodec) Option + func WithRequestTimeout(requestTimeout time.Duration) Option + func WithSerializer(serializer cfacade.ISerializer) Option