Example #1
0
File: proto.go Project: gonet2/game
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
}
Example #2
0
File: proto.go Project: gonet2/game
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
}
Example #3
0
File: proto.go Project: gonet2/game
func PKT_auto_id(reader *packet.Packet) (tbl S_auto_id, err error) {
	tbl.F_id, err = reader.ReadS32()
	checkErr(err)

	return
}
Example #4
0
File: proto.go Project: gonet2/game
func (p S_user_snapshot) Pack(w *packet.Packet) {
	w.WriteS32(p.F_uid)

}
Example #5
0
File: proto.go Project: gonet2/game
func (p S_seed_info) Pack(w *packet.Packet) {
	w.WriteS32(p.F_client_send_seed)
	w.WriteS32(p.F_client_receive_seed)

}
Example #6
0
File: proto.go Project: gonet2/game
func (p S_user_login_info) Pack(w *packet.Packet) {
	w.WriteS32(p.F_login_way)
	w.WriteString(p.F_open_udid)
	w.WriteString(p.F_client_certificate)
	w.WriteS32(p.F_client_version)
	w.WriteString(p.F_user_lang)
	w.WriteString(p.F_app_id)
	w.WriteString(p.F_os_version)
	w.WriteString(p.F_device_name)
	w.WriteString(p.F_device_id)
	w.WriteS32(p.F_device_id_type)
	w.WriteString(p.F_login_ip)

}
Example #7
0
File: proto.go Project: gonet2/game
func (p S_error_info) Pack(w *packet.Packet) {
	w.WriteS32(p.F_code)
	w.WriteString(p.F_msg)

}
Example #8
0
File: proto.go Project: gonet2/game
func (p S_auto_id) Pack(w *packet.Packet) {
	w.WriteS32(p.F_id)

}
Example #9
0
File: proto.go Project: gonet2/game
func PKT_user_snapshot(reader *packet.Packet) (tbl S_user_snapshot, err error) {
	tbl.F_uid, err = reader.ReadS32()
	checkErr(err)

	return
}
Example #10
0
File: proto.go Project: gonet2/game
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
}