using System;
using System.Threading;
using System.Threading.Tasks;
namespace Capnp.Rpc
{
///
/// Low-level interface of a capability at provider side.
///
public interface IProvidedCapability
{
///
/// Calls an interface method of this capability.
///
/// ID of interface to call
/// ID of method to call
/// Method arguments ("params struct")
/// Cancellation token, indicating when the call should cancelled.
/// A Task which will resolve to the call result ("result struct")
Task Invoke(ulong interfaceId, ushort methodId,
DeserializerState args, CancellationToken cancellationToken = default);
}
}