コード例 #1
0
ファイル: NetcodeMetadataPacket.cs プロジェクト: ketura/XGEF
 public NetcodeMetadataPacket(XEventArgs args)
 {
     if (args == null)
     {
         MetadataDefined = false;
         OriginatorID    = 0;
         EventID         = -1;
         EventNameLength = 0;
         EventName       = "";
         Payload         = new byte[0];
     }
     else
     {
         MetadataDefined = true;
         OriginatorID    = args.OriginatorID;
         EventID         = args.EventID;
         EventNameLength = (byte)Encoding.UTF8.GetByteCount(args.EventName);
         EventName       = args.EventName;
         Payload         = args.SerializeToBitstream();
     }
 }
コード例 #2
0
ファイル: NetcodeIOAdapter.cs プロジェクト: ketura/XGEF
 //TODO: bring this to parity with the all-client version
 public virtual void SendMessage(IClientAdapter client, XEventArgs data)
 {
     data.OriginatorID = ID;
     SendRawData(client, data.SerializeToBitstream());
 }