Documentation
¶
Index ¶
- Constants
- func DecodeBinToPayload(data []byte, kcpMsgList *[]*PackMsg, xorKey []byte)
- func DecodeLoop(data []byte, kcpMsgList *[]*PackMsg)
- func EncodePayloadToBin(kcpMsg *PackMsg, xorKey []byte) (bin []byte)
- func ExtractDigits(str string) uint32
- func GetAppId() string
- func GetAppIdStr(appId uint32) string
- func GetAppIdUint32(appid string) uint32
- func GetDaysSinceBaseline(currentTime time.Time) int32
- func GetEc2b() *random.Ec2b
- func GetEveryDay4() time.Duration
- func GetRelicSub(sub string) map[uint32]uint32
- func MaxUin32(x, y uint32) uint32
- func NewHttp(netInfo constant.AppNet, handler http.Handler) error
- func S2I(msg string) int
- func S2I32(msg string) int32
- func S2U32(msg string) uint32
- func TcpDecodeBinToPayload(bin []byte, kcpMsgList *[]*PackMsg, xorKey []byte) error
- func TcpDecodeLoop(bin []byte, kcpMsgList *[]*PackMsg, xorKey []byte, err error)
- func TcpEncodePayloadToBin(kcpMsg *PackMsg, xorKey []byte) (bin []byte)
- type PackMsg
- type Status
Constants ¶
View Source
const (
PacketMaxLen = 343 * 1024 // 最大应用层包长度
)
Variables ¶
This section is empty.
Functions ¶
func DecodeBinToPayload ¶
func DecodeLoop ¶
func EncodePayloadToBin ¶
func ExtractDigits ¶ added in v1.5.0
func GetAppIdStr ¶ added in v1.2.1
func GetAppIdUint32 ¶ added in v1.2.1
func GetDaysSinceBaseline ¶ added in v1.5.0
func GetEveryDay4 ¶ added in v1.2.1
func GetRelicSub ¶ added in v1.5.0
func TcpDecodeBinToPayload ¶ added in v1.6.0
func TcpDecodeLoop ¶ added in v1.6.0
func TcpEncodePayloadToBin ¶ added in v1.6.0
Types ¶
type Status ¶ added in v1.5.0
type Status struct {
T time.Time `json:"-"`
Cpu float64 `json:"cpu"`
Mem struct {
Current uint64 `json:"current"`
Total uint64 `json:"total"`
} `json:"mem"`
Swap struct {
Current uint64 `json:"current"`
Total uint64 `json:"total"`
} `json:"swap"`
Disk struct {
Current uint64 `json:"current"`
Total uint64 `json:"total"`
} `json:"disk"`
Uptime uint64 `json:"uptime"`
Loads []float64 `json:"loads"`
TcpCount int `json:"tcpCount"`
UdpCount int `json:"udpCount"`
NetTraffic struct {
Sent uint64 `json:"sent"`
Recv uint64 `json:"recv"`
} `json:"netTraffic"`
}
Click to show internal directories.
Click to hide internal directories.