Add XML documentation across gateway, worker, and .NET client
This commit is contained in:
@@ -7,11 +7,15 @@ using MxGateway.Contracts.Proto;
|
||||
|
||||
namespace MxGateway.Worker.Ipc;
|
||||
|
||||
/// <summary>Reads length-prefixed WorkerEnvelope protobuf frames from a stream.</summary>
|
||||
public sealed class WorkerFrameReader
|
||||
{
|
||||
private readonly WorkerFrameProtocolOptions _options;
|
||||
private readonly Stream _stream;
|
||||
|
||||
/// <summary>Initializes the reader with a stream and protocol options.</summary>
|
||||
/// <param name="stream">Stream to read frames from.</param>
|
||||
/// <param name="options">Protocol options for frame validation.</param>
|
||||
public WorkerFrameReader(
|
||||
Stream stream,
|
||||
WorkerFrameProtocolOptions options)
|
||||
@@ -20,6 +24,8 @@ public sealed class WorkerFrameReader
|
||||
_options = options ?? throw new ArgumentNullException(nameof(options));
|
||||
}
|
||||
|
||||
/// <summary>Reads and validates a single length-prefixed frame from the stream.</summary>
|
||||
/// <param name="cancellationToken">Token to cancel the asynchronous operation.</param>
|
||||
public async Task<WorkerEnvelope> ReadAsync(CancellationToken cancellationToken = default)
|
||||
{
|
||||
byte[] lengthPrefix = new byte[sizeof(uint)];
|
||||
|
||||
Reference in New Issue
Block a user