35 lines
796 B
C#
Raw Normal View History

2019-09-01 14:21:05 +02:00
using System;
2020-01-11 17:21:31 +01:00
#nullable enable
2019-09-01 14:21:05 +02:00
namespace Capnp.FrameTracing
{
/// <summary>
/// Send or receive
/// </summary>
2019-09-01 14:21:05 +02:00
public enum FrameDirection
{
/// <summary>
/// Receive direction
/// </summary>
2019-09-01 14:21:05 +02:00
Rx,
/// <summary>
/// Send direction
/// </summary>
2019-09-01 14:21:05 +02:00
Tx
}
/// <summary>
/// Client interface for observing RPC traffic
/// </summary>
2019-09-01 14:21:05 +02:00
public interface IFrameTracer: IDisposable
{
/// <summary>
/// Called whenever an RPC frame was sent or received
/// </summary>
/// <param name="direction">frame direction</param>
/// <param name="frame">actual frame</param>
2019-09-01 14:21:05 +02:00
void TraceFrame(FrameDirection direction, WireFrame frame);
}
}
2020-01-11 17:21:31 +01:00
#nullable restore