Documentation ¶
Index ¶
- Constants
- func GetMd5String(s string) string
- func UniqueId() string
- type CatchMsg
- type Client
- type ClientConn
- type MyMsg
- func (p *MyMsg) Len(proto int) int
- func (p *MyMsg) LenData(data []byte) int
- func (p *MyMsg) LenString(s string) int
- func (p *MyMsg) Marshal(proto int) ([]byte, error)
- func (p *MyMsg) MarshalData(data []byte) []byte
- func (p *MyMsg) MarshalString(s string) []byte
- func (p *MyMsg) Unmarshal(b []byte) error
- func (p *MyMsg) UnmarshalData(b []byte) []byte
- func (p *MyMsg) UnmarshalString(b []byte) string
- type Packet
- type Server
- type ServerConn
Constants ¶
View Source
const ( DATA uint32 = 0x01010101 PING uint32 = 0x02020202 CATCH uint32 = 0x03030303 END uint32 = 0xAAAABBBB )
Variables ¶
This section is empty.
Functions ¶
func GetMd5String ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Close ¶
func (p *Client) Close(clientConn *ClientConn)
func (*Client) ServerAddr ¶
func (*Client) ServerIPAddr ¶
func (*Client) TargetAddr ¶
type ClientConn ¶
type ClientConn struct {
// contains filtered or unexported fields
}
type MyMsg ¶
type MyMsg struct { TYPE uint32 ID string TARGET string Data []byte RPROTO uint16 CATCH uint16 KEY uint32 ENDTYPE uint32 }
func (*MyMsg) MarshalData ¶
func (*MyMsg) MarshalString ¶
func (*MyMsg) UnmarshalData ¶
func (*MyMsg) UnmarshalString ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Close ¶
func (p *Server) Close(conn *ServerConn)
type ServerConn ¶
type ServerConn struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.