Exemplo n.º 1
0
        public static ConnectionHeartbeatRequest Execute(ConnectionManager manager, ICountdownTimer timer,
                                                         Func <DateTimeOffset> nowProvider, Action <TimeSpan?, ErrorInfo> callback)
        {
            var request = new ConnectionHeartbeatRequest(manager, timer, nowProvider);

            return(request.Send(callback));
        }
Exemplo n.º 2
0
        private async Task ProcessTransportMessage(ProtocolMessage message)
        {
            try
            {
                var handled = await State.OnMessageReceived(message);

                handled |= AckProcessor.OnMessageReceived(message);
                handled |= ConnectionHeartbeatRequest.CanHandleMessage(message);

                Connection.UpdateSerial(message);
                MessageReceived?.Invoke(message);
            }
            catch (Exception e)
            {
                Logger.Error("Error processing message: " + message, e);
                throw new AblyException(e);
            }
        }