Пример #1
0
 /// <summary>
 /// Construct the bidirectional streaming method for <c>StreamingRecognize</c>.
 /// </summary>
 /// <param name="service">The service containing this streaming method.</param>
 /// <param name="call">The underlying gRPC duplex streaming call.</param>
 /// <param name="writeBuffer">The <see cref="gaxgrpc::BufferedClientStreamWriter{StreamingRecognizeRequest}"/>
 /// instance associated with this streaming call.</param>
 public StreamingRecognizeStreamImpl(
     SpeechClientImpl service,
     grpccore::AsyncDuplexStreamingCall <StreamingRecognizeRequest, StreamingRecognizeResponse> call,
     gaxgrpc::BufferedClientStreamWriter <StreamingRecognizeRequest> writeBuffer)
 {
     _service     = service;
     GrpcCall     = call;
     _writeBuffer = writeBuffer;
 }
Пример #2
0
 /// <summary>
 /// Construct the bidirectional streaming method for <c>StreamingDetectIntent</c>.
 /// </summary>
 /// <param name="service">The service containing this streaming method.</param>
 /// <param name="call">The underlying gRPC duplex streaming call.</param>
 /// <param name="writeBuffer">The <see cref="gaxgrpc::BufferedClientStreamWriter{StreamingDetectIntentRequest}"/>
 /// instance associated with this streaming call.</param>
 public StreamingDetectIntentStreamImpl(
     SessionsClientImpl service,
     grpccore::AsyncDuplexStreamingCall <StreamingDetectIntentRequest, StreamingDetectIntentResponse> call,
     gaxgrpc::BufferedClientStreamWriter <StreamingDetectIntentRequest> writeBuffer)
 {
     _service     = service;
     GrpcCall     = call;
     _writeBuffer = writeBuffer;
 }
Пример #3
0
        /// <summary>
        /// Egress streams egress requests and responses. Logically, this is not
        /// actually a streaming request, but uses streaming as a mechanism to flip
        /// the client-server relationship of gRPC so that the server can act as a
        /// client.
        /// The listener, the RPC server, accepts connections from the dialer,
        /// the RPC client.
        /// The listener streams http requests and the dialer streams http responses.
        /// </summary>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <param name="streamingSettings">If not null, applies streaming overrides to this RPC call.</param>
        /// <returns>The client-server stream.</returns>
        public override TetherClient.EgressStream Egress(gaxgrpc::CallSettings callSettings = null, gaxgrpc::BidirectionalStreamingSettings streamingSettings = null)
        {
            Modify_EgressResponseCallSettings(ref callSettings);
            gaxgrpc::BidirectionalStreamingSettings effectiveStreamingSettings      = streamingSettings ?? _callEgress.StreamingSettings;
            grpccore::AsyncDuplexStreamingCall <EgressResponse, EgressRequest> call = _callEgress.Call(callSettings);
            gaxgrpc::BufferedClientStreamWriter <EgressResponse> writeBuffer        = new gaxgrpc::BufferedClientStreamWriter <EgressResponse>(call.RequestStream, effectiveStreamingSettings.BufferedClientWriterCapacity);

            return(new EgressStreamImpl(this, call, writeBuffer));
        }
Пример #4
0
        /// <summary>
        /// Performs bidirectional streaming speech recognition: receive results while
        /// sending audio. This method is only available via the gRPC API (not REST).
        /// </summary>
        /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
        /// <param name="streamingSettings">If not null, applies streaming overrides to this RPC call.</param>
        /// <returns>The client-server stream.</returns>
        public override SpeechClient.StreamingRecognizeStream StreamingRecognize(gaxgrpc::CallSettings callSettings = null, gaxgrpc::BidirectionalStreamingSettings streamingSettings = null)
        {
            Modify_StreamingRecognizeRequestCallSettings(ref callSettings);
            gaxgrpc::BidirectionalStreamingSettings effectiveStreamingSettings = streamingSettings ?? _callStreamingRecognize.StreamingSettings;
            grpccore::AsyncDuplexStreamingCall <StreamingRecognizeRequest, StreamingRecognizeResponse> call = _callStreamingRecognize.Call(callSettings);
            gaxgrpc::BufferedClientStreamWriter <StreamingRecognizeRequest> writeBuffer = new gaxgrpc::BufferedClientStreamWriter <StreamingRecognizeRequest>(call.RequestStream, effectiveStreamingSettings.BufferedClientWriterCapacity);

            return(new StreamingRecognizeStreamImpl(this, call, writeBuffer));
        }
Пример #5
0
 /// <summary>Construct the bidirectional streaming method for <c>StreamingTranslateSpeech</c>.</summary>
 /// <param name="service">The service containing this streaming method.</param>
 /// <param name="call">The underlying gRPC duplex streaming call.</param>
 /// <param name="writeBuffer">
 /// The <see cref="gaxgrpc::BufferedClientStreamWriter{StreamingTranslateSpeechRequest}"/> instance
 /// associated with this streaming call.
 /// </param>
 public StreamingTranslateSpeechStreamImpl(SpeechTranslationServiceClientImpl service, grpccore::AsyncDuplexStreamingCall <StreamingTranslateSpeechRequest, StreamingTranslateSpeechResponse> call, gaxgrpc::BufferedClientStreamWriter <StreamingTranslateSpeechRequest> writeBuffer)
 {
     _service     = service;
     GrpcCall     = call;
     _writeBuffer = writeBuffer;
 }
Пример #6
0
 /// <summary>Construct the bidirectional streaming method for <c>Egress</c>.</summary>
 /// <param name="service">The service containing this streaming method.</param>
 /// <param name="call">The underlying gRPC duplex streaming call.</param>
 /// <param name="writeBuffer">
 /// The <see cref="gaxgrpc::BufferedClientStreamWriter{EgressResponse}"/> instance associated with this
 /// streaming call.
 /// </param>
 public EgressStreamImpl(TetherClientImpl service, grpccore::AsyncDuplexStreamingCall <EgressResponse, EgressRequest> call, gaxgrpc::BufferedClientStreamWriter <EgressResponse> writeBuffer)
 {
     _service     = service;
     GrpcCall     = call;
     _writeBuffer = writeBuffer;
 }
 /// <summary>Construct the bidirectional streaming method for <c>MethodBidi</c>.</summary>
 /// <param name="service">The service containing this streaming method.</param>
 /// <param name="call">The underlying gRPC duplex streaming call.</param>
 /// <param name="writeBuffer">
 /// The <see cref="gaxgrpc::BufferedClientStreamWriter{Request}"/> instance associated with this streaming
 /// call.
 /// </param>
 public MethodBidiStreamImpl(BasicBidiStreamingClientImpl service, grpccore::AsyncDuplexStreamingCall <Request, Response> call, gaxgrpc::BufferedClientStreamWriter <Request> writeBuffer)
 {
     _service     = service;
     GrpcCall     = call;
     _writeBuffer = writeBuffer;
 }