//
// IMessageResponder.cs
//
// Copyright (c) František Boháček. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Remora.Results;
namespace NosSmooth.Comms.Data.Responders;
///
/// A responder to a received message from client or server.
///
/// The type of the message to respond to.
public interface IMessageResponder
{
///
/// Respond to the given message.
///
/// The message received.
/// The cancellation token used for cancelling the operation.
/// A result that may or may not have succeeded.
public Task Respond(TMessage message, CancellationToken ct = default);
}