2015-09-28 04:01:17 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TLSharp.Core.Requests
|
|
|
|
|
|
{
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public class AckRequest : MTProtoRequest
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly List<ulong> _msgs;
|
|
|
|
|
|
public AckRequest(List<ulong> msgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
_msgs = msgs;
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public override void OnSend(BinaryWriter writer)
|
|
|
|
|
|
{
|
|
|
|
|
|
writer.Write(0x62d6b459); // msgs_ack
|
|
|
|
|
|
writer.Write(0x1cb5c415); // Vector
|
|
|
|
|
|
writer.Write(_msgs.Count);
|
|
|
|
|
|
foreach (ulong messageId in _msgs)
|
|
|
|
|
|
{
|
|
|
|
|
|
writer.Write(messageId);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public override void OnResponse(BinaryReader reader)
|
|
|
|
|
|
{
|
|
|
|
|
|
//throw new NotImplementedException();
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public override void OnException(Exception exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
|
2016-04-18 12:50:57 +02:00
|
|
|
|
public override bool Confirmed => false;
|
|
|
|
|
|
public override bool Responded { get; }
|
|
|
|
|
|
}
|
2015-09-28 04:01:17 +02:00
|
|
|
|
}
|