Class GrpcWorkerConnection<TMessage>
- Namespace
- Microsoft.AutoGen.RuntimeGateway.Grpc
- Assembly
- Microsoft.AutoGen.RuntimeGateway.Grpc.dll
public sealed class GrpcWorkerConnection<TMessage> : IAsyncDisposable where TMessage : class
Type Parameters
TMessage
- Inheritance
-
GrpcWorkerConnection<TMessage>
- Implements
- Inherited Members
Constructors
GrpcWorkerConnection(GrpcGateway, IAsyncStreamReader<TMessage>, IServerStreamWriter<TMessage>, ServerCallContext)
public GrpcWorkerConnection(GrpcGateway agentWorker, IAsyncStreamReader<TMessage> requestStream, IServerStreamWriter<TMessage> responseStream, ServerCallContext context)
Parameters
agentWorker
GrpcGatewayrequestStream
IAsyncStreamReader<TMessage>responseStream
IServerStreamWriter<TMessage>context
ServerCallContext
Properties
Completion
public Task Completion { get; }
Property Value
RequestStream
public IAsyncStreamReader<TMessage> RequestStream { get; }
Property Value
- IAsyncStreamReader<TMessage>
ResponseStream
public IServerStreamWriter<TMessage> ResponseStream { get; }
Property Value
- IServerStreamWriter<TMessage>
ServerCallContext
public ServerCallContext ServerCallContext { get; }
Property Value
Methods
AddSupportedType(string)
public void AddSupportedType(string type)
Parameters
type
string
Connect()
public Task Connect()
Returns
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()
Returns
- ValueTask
A task that represents the asynchronous dispose operation.
GetSupportedTypes()
public HashSet<string> GetSupportedTypes()
Returns
RunReadPump()
public Task RunReadPump()
Returns
RunWritePump()
public Task RunWritePump()
Returns
SendMessage(TMessage)
public Task SendMessage(TMessage message)
Parameters
message
TMessage
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.