Initializergrpc-swift 2.0.0GRPCCore
init(of:metadata:producer:)
Creates a new accepted response.
init(of messageType: Message.Type = Message.self, metadata: Metadata = [:], producer: @escaping (RPCWriter<Message>) async throws -> Metadata)
Parameters
- messageType
The type of message.
- metadata
Metadata to send to the client at the beginning of the response.
- producer
A closure which, when called, writes messages to the client.