2019-09-01 14:21:05 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Capnp.FrameTracing
|
|
|
|
|
{
|
2019-12-11 21:09:43 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Send or receive
|
|
|
|
|
/// </summary>
|
2019-09-01 14:21:05 +02:00
|
|
|
|
public enum FrameDirection
|
|
|
|
|
{
|
2019-12-11 21:09:43 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Receive direction
|
|
|
|
|
/// </summary>
|
2019-09-01 14:21:05 +02:00
|
|
|
|
Rx,
|
2019-12-11 21:09:43 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Send direction
|
|
|
|
|
/// </summary>
|
2019-09-01 14:21:05 +02:00
|
|
|
|
Tx
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-11 21:09:43 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Client interface for observing RPC traffic
|
|
|
|
|
/// </summary>
|
2019-09-01 14:21:05 +02:00
|
|
|
|
public interface IFrameTracer: IDisposable
|
|
|
|
|
{
|
2019-12-11 21:09:43 +01:00
|
|
|
|
/// <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);
|
|
|
|
|
}
|
|
|
|
|
}
|