Documentation
¶
Index ¶
- Constants
- func DecodeBinToPayload(data []byte, kcpMsgList *[]*PackMsg, xorKey []byte)
- func DecodeLoop(data []byte, kcpMsgList *[]*PackMsg)
- func DecodePayloadToProto(msg *PackMsg) (protoObj pb.Message)
- func EncodePayloadToBin(kcpMsg *PackMsg, xorKey []byte) (bin []byte)
- func GetAppId() string
- func GetEc2b() *random.Ec2b
- type PackMsg
- type ProtoMsg
- type SnowflakeWorker
Constants ¶
View Source
const (
PacketMaxLen = 343 * 1024 // 最大应用层包长度
)
Variables ¶
This section is empty.
Functions ¶
func DecodeBinToPayload ¶
func DecodeLoop ¶
func DecodePayloadToProto ¶
func EncodePayloadToBin ¶
Types ¶
type PackMsg ¶
func EncodeProtoToPayload ¶
type SnowflakeWorker ¶
type SnowflakeWorker struct {
// contains filtered or unexported fields
}
func NewSnowflakeWorker ¶
func NewSnowflakeWorker(workerId int64) *SnowflakeWorker
func (*SnowflakeWorker) GenId ¶
func (s *SnowflakeWorker) GenId() int64
Click to show internal directories.
Click to hide internal directories.