Documentation ¶
Index ¶
- Constants
- Variables
- type AcceptClient
- type Client
- func (c *Client) Close()
- func (c *Client) DialAndServe(address string, password []byte, salt []byte) error
- func (c *Client) NextRequestId(cb func(*Message)) uint32
- func (c *Client) OnReply(msg *Message)
- func (c *Client) Reconnect(second time.Duration)
- func (c *Client) Send(tag uint32, data []byte, cb func(*Message)) (err error)
- type Message
- type MessageType
- type Server
Constants ¶
View Source
const ( MessageTypeKeep = MessageType(1) MessageTypeData = MessageType(2) MessageTypeReply = MessageType(3) )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AcceptClient ¶
type AcceptClient struct {
// contains filtered or unexported fields
}
type Client ¶
type Client struct { ReadTimeout time.Duration WriteTimeout time.Duration OnConnected func() OnClose func() OnData func(message *Message) // contains filtered or unexported fields }
func (*Client) DialAndServe ¶
func (*Client) NextRequestId ¶ added in v1.0.3
type Message ¶ added in v1.0.3
type Message struct { Type MessageType Payload []byte Tag uint32 // contains filtered or unexported fields }
type MessageType ¶
type MessageType uint8
Click to show internal directories.
Click to hide internal directories.