本文整理汇总了Golang中game/misc/packet.Packet类的典型用法代码示例。如果您正苦于以下问题:Golang Packet类的具体用法?Golang Packet怎么用?Golang Packet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Packet类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: PKT_error_info
func PKT_error_info(reader *packet.Packet) (tbl S_error_info, err error) {
tbl.F_code, err = reader.ReadS32()
checkErr(err)
tbl.F_msg, err = reader.ReadString()
checkErr(err)
return
}
示例2: PKT_seed_info
func PKT_seed_info(reader *packet.Packet) (tbl S_seed_info, err error) {
tbl.F_client_send_seed, err = reader.ReadS32()
checkErr(err)
tbl.F_client_receive_seed, err = reader.ReadS32()
checkErr(err)
return
}
示例3: PKT_auto_id
func PKT_auto_id(reader *packet.Packet) (tbl S_auto_id, err error) {
tbl.F_id, err = reader.ReadS32()
checkErr(err)
return
}
示例4: Pack
func (p S_user_snapshot) Pack(w *packet.Packet) {
w.WriteS32(p.F_uid)
}
示例5: PKT_user_snapshot
func PKT_user_snapshot(reader *packet.Packet) (tbl S_user_snapshot, err error) {
tbl.F_uid, err = reader.ReadS32()
checkErr(err)
return
}
示例6: PKT_user_login_info
func PKT_user_login_info(reader *packet.Packet) (tbl S_user_login_info, err error) {
tbl.F_login_way, err = reader.ReadS32()
checkErr(err)
tbl.F_open_udid, err = reader.ReadString()
checkErr(err)
tbl.F_client_certificate, err = reader.ReadString()
checkErr(err)
tbl.F_client_version, err = reader.ReadS32()
checkErr(err)
tbl.F_user_lang, err = reader.ReadString()
checkErr(err)
tbl.F_app_id, err = reader.ReadString()
checkErr(err)
tbl.F_os_version, err = reader.ReadString()
checkErr(err)
tbl.F_device_name, err = reader.ReadString()
checkErr(err)
tbl.F_device_id, err = reader.ReadString()
checkErr(err)
tbl.F_device_id_type, err = reader.ReadS32()
checkErr(err)
tbl.F_login_ip, err = reader.ReadString()
checkErr(err)
return
}