Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeBinToPayload(data []byte, kcpMsgList *[]*KcpMsg, xorKey []byte)
- func DecodeLoop(data []byte, kcpMsgList *[]*KcpMsg)
- func EncodePayloadToBin(kcpMsg *KcpMsg, xorKey []byte) (bin []byte)
- func KcpNetInfo()
- func NewBot()
- type Game
- type KcpMsg
- type ProtoMessage
- type ProtoMsg
- type RoBot
- func (r *RoBot) DecodePayloadToProto(msg *KcpMsg) (protoObj pb.Message)
- func (r *RoBot) EncodeProtoToPayload(protoMsg *ProtoMsg) (kcpMsg *KcpMsg)
- func (r *RoBot) EnterSceneByServerScNotify(payloadMsg pb.Message)
- func (r *RoBot) EnterSceneCsReq()
- func (r *RoBot) GetCurSceneInfoScRsp(payloadMsg pb.Message)
- func (r *RoBot) PlayerGetTokenCsReq()
- func (r *RoBot) PlayerHeartBeatCsReq()
- func (r *RoBot) PlayerHeartbeatScRsp(payloadMsg pb.Message)
- func (r *RoBot) PlayerLoginCsReq()
- func (r *RoBot) PlayerLoginScRsp()
- func (r *RoBot) RegisterMessage(cmdId uint16, payloadMsg pb.Message)
- type Vector
Constants ¶
View Source
const PacketMaxLen = 343 * 1024 // 最大应用层包长度
Variables ¶
View Source
var CLIENT_CONN_NUM int32 = 0 // 当前客户端连接数
Functions ¶
func DecodeBinToPayload ¶
func DecodeLoop ¶
func EncodePayloadToBin ¶
func KcpNetInfo ¶
func KcpNetInfo()
Types ¶
type ProtoMessage ¶
type ProtoMessage struct {
// contains filtered or unexported fields
}
type RoBot ¶
type RoBot struct { HttpClient *resty.Client AccountName string AccountUid string GameUid uint32 IsXor bool Seed uint64 Token string XorKey []byte KcpAddr string KcpPort uint32 KcpConn net.Conn Game *Game }
func (*RoBot) DecodePayloadToProto ¶
func (*RoBot) EncodeProtoToPayload ¶
func (*RoBot) EnterSceneByServerScNotify ¶
func (*RoBot) EnterSceneCsReq ¶
func (r *RoBot) EnterSceneCsReq()
func (*RoBot) GetCurSceneInfoScRsp ¶
func (*RoBot) PlayerGetTokenCsReq ¶
func (r *RoBot) PlayerGetTokenCsReq()
func (*RoBot) PlayerHeartBeatCsReq ¶
func (r *RoBot) PlayerHeartBeatCsReq()
func (*RoBot) PlayerHeartbeatScRsp ¶
func (*RoBot) PlayerLoginCsReq ¶
func (r *RoBot) PlayerLoginCsReq()
func (*RoBot) PlayerLoginScRsp ¶
func (r *RoBot) PlayerLoginScRsp()
Click to show internal directories.
Click to hide internal directories.