當前位置: 首頁>>代碼示例>>Golang>>正文


Golang Packet.ReadUint32方法代碼示例

本文整理匯總了Golang中packet.Packet.ReadUint32方法的典型用法代碼示例。如果您正苦於以下問題:Golang Packet.ReadUint32方法的具體用法?Golang Packet.ReadUint32怎麽用?Golang Packet.ReadUint32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在packet.Packet的用法示例。


在下文中一共展示了Packet.ReadUint32方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: MsgFriendBaseAddDecode

func MsgFriendBaseAddDecode(pack *packet.Packet) *MsgFriendBaseAdd {
	msgFriendBaseAdd := &MsgFriendBaseAdd{}

	msgFriendBaseAdd.uid = pack.ReadUint32()
	msgFriendBaseAdd.uname = pack.ReadString()
	return msgFriendBaseAdd
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:7,代碼來源:msg_friend_base_add.go

示例2: MsgScenePlayerDecode

func MsgScenePlayerDecode(pack *packet.Packet) *MsgScenePlayer {
	msgScenePlayer := &MsgScenePlayer{}

	msgScenePlayer.uid = pack.ReadUint32()
	msgScenePlayer.sceneRotPos = MsgSceneRotPosDecode(pack)
	return msgScenePlayer
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:7,代碼來源:msg_scene_player.go

示例3: MsgRoleBaseDecode

func MsgRoleBaseDecode(pack *packet.Packet) *MsgRoleBase {
	msgRoleBase := &MsgRoleBase{}

	msgRoleBase.uid = pack.ReadUint32()
	msgRoleBase.uname = pack.ReadString()
	return msgRoleBase
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:7,代碼來源:msg_role_base.go

示例4: ReqChatSendDecode

func ReqChatSendDecode(pack *packet.Packet) *ReqChatSend {
	reqChatSend := &ReqChatSend{}

	reqChatSend.channel = pack.ReadUint8()
	reqChatSend.destUid = pack.ReadUint32()
	reqChatSend.content = pack.ReadString()
	return reqChatSend
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:8,代碼來源:req_chat_send.go

示例5: 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
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:9,代碼來源:ack_chat_send_ok.go

示例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
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:10,代碼來源:ack_scene_move.go

示例7: AckTestXXDecode

func AckTestXXDecode(pack *packet.Packet) *AckTestXX {
	ackTestXX := &AckTestXX{}

	ackTestXX.idU8 = pack.ReadUint8()
	ackTestXX.idU16 = pack.ReadUint16()
	ackTestXX.idU32 = pack.ReadUint32()
	repeatIdU8Count := pack.ReadUint16()
	for ; repeatIdU8Count > 0; repeatIdU8Count-- {
		ackTestXX.repeatIdU8 = append(ackTestXX.repeatIdU8, pack.ReadUint8())
	}
	ackTestXX.optionalIdU8Flag = pack.ReadUint8()
	if ackTestXX.optionalIdU8Flag == 1 {
		ackTestXX.optionalIdU8 = pack.ReadUint8()
	}
	return ackTestXX
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:16,代碼來源:ack_test_x_x.go

示例8: 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
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:15,代碼來源:req_role_login.go

示例9: 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
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:15,代碼來源:req_role_create.go

示例10: ReqSceneEnterFlyDecode

func ReqSceneEnterFlyDecode(pack *packet.Packet) *ReqSceneEnterFly {
	reqSceneEnterFly := &ReqSceneEnterFly{}

	reqSceneEnterFly.mapId = pack.ReadUint32()
	return reqSceneEnterFly
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:6,代碼來源:req_scene_enter_fly.go

示例11: AckSceneExitDecode

func AckSceneExitDecode(pack *packet.Packet) *AckSceneExit {
	ackSceneExit := &AckSceneExit{}

	ackSceneExit.uid = pack.ReadUint32()
	return ackSceneExit
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:6,代碼來源:ack_scene_exit.go

示例12: ReqSceneEnterDecode

func ReqSceneEnterDecode(pack *packet.Packet) *ReqSceneEnter {
	reqSceneEnter := &ReqSceneEnter{}

	reqSceneEnter.doorId = pack.ReadUint32()
	return reqSceneEnter
}
開發者ID:mirahs,項目名稱:xxtools,代碼行數:6,代碼來源:req_scene_enter.go


注:本文中的packet.Packet.ReadUint32方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。