/// <summary>Helper: Serialize with a varint length prefix</summary>
        internal static void SerializeLengthDelimited(Stream stream, PingCommand instance)
        {
            MemoryStream ms = PooledObjects.MemoryStreamPool.Pop();

            try
            {
                Serialize(ms, instance);
#if __WINDOWS__
                var data = ms.ToArray();
#else
                var data = ms.GetBuffer();
#endif
                global::GameSparks.RT.Proto.ProtocolParser.WriteUInt32(stream, (uint)ms.Position);
                stream.Write(data, 0, (int)ms.Position);
            }
            finally
            {
                PooledObjects.MemoryStreamPool.Push(ms);
            }
        }
 /// <summary>Serialize the instance into the stream</summary>
 internal static void Serialize(Stream stream, PingCommand instance)
 {
 }
示例#3
0
 internal override void Serialize(Stream stream)
 {
     PingCommand.Serialize(stream, this);
 }