TLSharp/TLSharp.Core/Network/Requests/AckRequest.cs

51 lines
1.1 KiB
C#
Raw Permalink Normal View History

2015-09-28 04:01:17 +02:00
using System;
using System.Collections.Generic;
using System.IO;
2016-09-24 15:38:26 +02:00
using TeleSharp.TL;
2015-09-28 04:01:17 +02:00
namespace TLSharp.Core.Network.Requests
2015-09-28 04:01:17 +02:00
{
public class AckRequest : TLMethod
2016-04-18 12:50:57 +02:00
{
private readonly List<ulong> msgs;
2016-09-24 15:38:26 +02:00
2016-04-18 12:50:57 +02:00
public AckRequest(List<ulong> msgs)
{
this.msgs = msgs;
2016-04-18 12:50:57 +02:00
}
2015-09-28 04:01:17 +02:00
2016-09-24 15:38:26 +02:00
public override void SerializeBody(BinaryWriter writer)
2016-04-18 12:50:57 +02:00
{
writer.Write(0x62d6b459); // msgs_ack
writer.Write(0x1cb5c415); // Vector
writer.Write(msgs.Count);
foreach (ulong messageId in msgs)
2016-04-18 12:50:57 +02:00
{
writer.Write(messageId);
}
}
2015-09-28 04:01:17 +02:00
2016-09-24 15:38:26 +02:00
public override void DeserializeBody(BinaryReader reader)
2016-04-18 12:50:57 +02:00
{
2016-09-24 15:38:26 +02:00
throw new NotImplementedException();
2016-04-18 12:50:57 +02:00
}
2015-09-28 04:01:17 +02:00
public override void DeserializeResponse(BinaryReader stream)
2016-04-18 12:50:57 +02:00
{
throw new NotImplementedException();
}
2015-09-28 04:01:17 +02:00
2016-04-18 12:50:57 +02:00
public override bool Confirmed => false;
2016-04-18 12:50:57 +02:00
public override bool Responded { get; }
2016-09-24 15:38:26 +02:00
public override int Constructor
{
get
{
return 0x62d6b459;
}
}
2016-04-18 12:50:57 +02:00
}
2015-09-28 04:01:17 +02:00
}