Beispiel #1
0
 public override OctetsStream marshal(OctetsStream os)
 {
     os.marshal(identity);
     os.marshal(userid);
     os.marshal(algo);
     os.marshal(response);
     os.marshal(device_info);
     return os;
 }
Beispiel #2
0
 public OctetsStream marshal(OctetsStream os)
 {
     Object[] arry = ToArray();
     os.compact_uint32((uint)arry.Length);
     for (int i = 0; i < arry.Length; i++)
     {
         os.marshal((Octets)arry[i]);
     }             
     return os;
 }
Beispiel #3
0
	void trySend()
	{
		if (++m_tickcount < 60)
			return;

		m_tickcount = m_tickcount % 60;

		IntPtr addr = TssSdk.tss_get_report_data();

		if(ECGameSession.Instance().IsConnected == false)
			return;

		if (addr != IntPtr.Zero)
		{
			IntPtr anti_data = IntPtr.Zero;
			ushort anti_data_len = 0;
			if (TssSdk.Is64bit())
			{
				short anti_data_len_temp = Marshal.ReadInt16(addr, 0);
				Int64 anti_data_temp = Marshal.ReadInt64(addr, 2);
				anti_data_len = (ushort)anti_data_len_temp;
				anti_data = new IntPtr(anti_data_temp);
			}
			else if (TssSdk.Is32bit())
			{
				short anti_data_len_temp = Marshal.ReadInt16(addr, 0);
				Int64 anti_data_temp = Marshal.ReadInt32(addr, 2);
				anti_data_len = (ushort)anti_data_len_temp;
				anti_data = new IntPtr(anti_data_temp);

			}

			if (anti_data != IntPtr.Zero)
			{
				byte[] data = new byte[anti_data_len];
				Marshal.Copy(anti_data, data, 0, anti_data_len);

				GNET.Common.OctetsStream os = new GNET.Common.OctetsStream();
				os.marshal_long((long)m_roleId);
				os.marshal(data);
				int nProtolNum = 8910;
				CommonData netdata = new CommonData(nProtolNum, os);
				ECGameSession gs = ECGameSession.Instance();
				gs.SendNetData(netdata);

				TssSdk.tss_del_report_data(addr);
			}
		}

	}
Beispiel #4
0
 public override OctetsStream marshal(OctetsStream os)
 {
     os.marshal(nonce);
     os.marshal(version);
     os.marshal(res_version);
     os.marshal(edition);
     os.marshal(algo);
     os.marshal(server_time);
     return os;
 }
Beispiel #5
0
        public override OctetsStream marshal(OctetsStream os)
        {
            os.marshal(serverList);
            os.marshal(version);
            os.marshal(versionList);
            os.marshal(serverListLength);
			os.marshal(versionLength);
			os.marshal(versionListLength);
            return os;
        }
Beispiel #6
0
 public override OctetsStream marshal(OctetsStream os)
 {
     os.marshal(roleid);
     os.marshal(localsid);
     return os;
 }
Beispiel #7
0
		public override OctetsStream marshal(OctetsStream os)
		{
			os.marshal(data);
			return os;
		}