本文整理汇总了Golang中packet.Packet.ReadString方法的典型用法代码示例。如果您正苦于以下问题:Golang Packet.ReadString方法的具体用法?Golang Packet.ReadString怎么用?Golang Packet.ReadString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类packet.Packet
的用法示例。
在下文中一共展示了Packet.ReadString方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: MsgFriendBaseAddDecode
func MsgFriendBaseAddDecode(pack *packet.Packet) *MsgFriendBaseAdd {
msgFriendBaseAdd := &MsgFriendBaseAdd{}
msgFriendBaseAdd.uid = pack.ReadUint32()
msgFriendBaseAdd.uname = pack.ReadString()
return msgFriendBaseAdd
}
示例2: MsgRoleBaseDecode
func MsgRoleBaseDecode(pack *packet.Packet) *MsgRoleBase {
msgRoleBase := &MsgRoleBase{}
msgRoleBase.uid = pack.ReadUint32()
msgRoleBase.uname = pack.ReadString()
return msgRoleBase
}
示例3: ReqChatSendDecode
func ReqChatSendDecode(pack *packet.Packet) *ReqChatSend {
reqChatSend := &ReqChatSend{}
reqChatSend.channel = pack.ReadUint8()
reqChatSend.destUid = pack.ReadUint32()
reqChatSend.content = pack.ReadString()
return reqChatSend
}
示例4: AckChatSendOkDecode
func AckChatSendOkDecode(pack *packet.Packet) *AckChatSendOk {
ackChatSendOk := &AckChatSendOk{}
ackChatSendOk.channel = pack.ReadUint8()
ackChatSendOk.uid = pack.ReadUint32()
ackChatSendOk.uname = pack.ReadString()
ackChatSendOk.content = pack.ReadString()
return ackChatSendOk
}
示例5: ReqSceneMoveDecode
func ReqSceneMoveDecode(pack *packet.Packet) *ReqSceneMove {
reqSceneMove := &ReqSceneMove{}
reqSceneMove.sceneRotPos = MsgSceneRotPosDecode(pack)
reqSceneMove.forward = MsgSceneVector3Decode(pack)
reqSceneMove.aniName = pack.ReadString()
reqSceneMove.xAxis = pack.ReadInt16()
return reqSceneMove
}
示例6: AckSceneMoveDecode
func AckSceneMoveDecode(pack *packet.Packet) *AckSceneMove {
ackSceneMove := &AckSceneMove{}
ackSceneMove.sceneRotPos = MsgSceneRotPosDecode(pack)
ackSceneMove.forward = MsgSceneVector3Decode(pack)
ackSceneMove.aniName = pack.ReadString()
ackSceneMove.xAxis = pack.ReadInt16()
ackSceneMove.uid = pack.ReadUint32()
return ackSceneMove
}
示例7: ReqRoleCreateDecode
func ReqRoleCreateDecode(pack *packet.Packet) *ReqRoleCreate {
reqRoleCreate := &ReqRoleCreate{}
reqRoleCreate.uid = pack.ReadUint32()
reqRoleCreate.uuid = pack.ReadUint32()
reqRoleCreate.sid = pack.ReadUint16()
reqRoleCreate.cid = pack.ReadUint16()
reqRoleCreate.os = pack.ReadString()
reqRoleCreate.version = pack.ReadString()
reqRoleCreate.uname = pack.ReadString()
reqRoleCreate.source = pack.ReadString()
reqRoleCreate.sourceSub = pack.ReadString()
reqRoleCreate.loginTime = pack.ReadUint32()
return reqRoleCreate
}
示例8: AckTestPhpOkDecode
func AckTestPhpOkDecode(pack *packet.Packet) *AckTestPhpOk {
ackTestPhpOk := &AckTestPhpOk{}
ackTestPhpOk.u64 = pack.ReadUint64()
ackTestPhpOk.strxx = pack.ReadString()
ackTestPhpOk.msgReq = MsgTestPhpDecode(pack)
ackTestPhpOk.msgOptFlag = pack.ReadUint8()
if ackTestPhpOk.msgOptFlag == 1 {
ackTestPhpOk.msgOpt = MsgTestPhpDecode(pack)
}
msgRepCount := pack.ReadUint16()
for ; msgRepCount > 0; msgRepCount-- {
ackTestPhpOk.msgRep = append(ackTestPhpOk.msgRep, MsgTestPhpDecode(pack))
}
return ackTestPhpOk
}
示例9: ReqRoleLoginDecode
func ReqRoleLoginDecode(pack *packet.Packet) *ReqRoleLogin {
reqRoleLogin := &ReqRoleLogin{}
reqRoleLogin.uid = pack.ReadUint32()
reqRoleLogin.uuid = pack.ReadUint32()
reqRoleLogin.sid = pack.ReadUint16()
reqRoleLogin.cid = pack.ReadUint16()
reqRoleLogin.loginTime = pack.ReadUint32()
reqRoleLogin.pwd = pack.ReadString()
reqRoleLogin.relink = pack.ReadUint8()
reqRoleLogin.debug = pack.ReadUint8()
reqRoleLogin.os = pack.ReadString()
reqRoleLogin.version = pack.ReadString()
return reqRoleLogin
}
示例10: ReqChatGmDecode
func ReqChatGmDecode(pack *packet.Packet) *ReqChatGm {
reqChatGm := &ReqChatGm{}
reqChatGm.content = pack.ReadString()
return reqChatGm
}
示例11: AckRoleLoginOkDecode
func AckRoleLoginOkDecode(pack *packet.Packet) *AckRoleLoginOk {
ackRoleLoginOk := &AckRoleLoginOk{}
ackRoleLoginOk.uname = pack.ReadString()
return ackRoleLoginOk
}