Example #1
0
        public async Task <(Task, long)> SendWithConfim(IObject obj)
        {
            Log.Debug($"Send with confirm {obj}");

            var mesId = await Send(obj).ConfigureAwait(false);

            var waitTask = ConfirmationRecieveService.WaitForConfirm(mesId);

            return(waitTask, mesId);
        }
        public async Task <Tuple <Task, long> > Send(IObject obj)
        {
            var preparedData = PrepareToSend(obj, out var mesId);

            await TcpTransport.Send(preparedData).ConfigureAwait(false);

            SessionStore.Save();

            var waitTask = ConfirmationRecieveService.WaitForConfirm(mesId);

            return(Tuple.Create(waitTask, mesId));
        }
Example #3
0
        public Tuple <Task, ulong> Send(TlMethod request)
        {
            var preparedData = PrepareToSend(request, out var mesId);

            TcpTransport.Send(preparedData).Wait();

            SessionStore.Save();

            var waitTask = ConfirmationRecieveService.WaitForConfirm(mesId);

            return(Tuple.Create(waitTask, mesId));
        }