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)); }
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); } }