• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2// GENERATED CODE -- DO NOT EDIT!
3
4// Original file comments:
5// Copyright 2015 gRPC authors.
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11//     http://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19// An integration test service that covers all the method signature permutations
20// of unary/streaming requests/responses.
21namespace Grpc\Testing;
22
23/**
24 */
25class BenchmarkServiceClient extends \Grpc\BaseStub {
26
27    /**
28     * @param string $hostname hostname
29     * @param array $opts channel options
30     * @param \Grpc\Channel $channel (optional) re-use channel object
31     */
32    public function __construct($hostname, $opts, $channel = null) {
33        parent::__construct($hostname, $opts, $channel);
34    }
35
36    /**
37     * One request followed by one response.
38     * The server returns the client payload as-is.
39     * @param \Grpc\Testing\SimpleRequest $argument input argument
40     * @param array $metadata metadata
41     * @param array $options call options
42     */
43    public function UnaryCall(\Grpc\Testing\SimpleRequest $argument,
44      $metadata = [], $options = []) {
45        return $this->_simpleRequest('/grpc.testing.BenchmarkService/UnaryCall',
46        $argument,
47        ['\Grpc\Testing\SimpleResponse', 'decode'],
48        $metadata, $options);
49    }
50
51    /**
52     * Repeated sequence of one request followed by one response.
53     * Should be called streaming ping-pong
54     * The server returns the client payload as-is on each response
55     * @param array $metadata metadata
56     * @param array $options call options
57     */
58    public function StreamingCall($metadata = [], $options = []) {
59        return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingCall',
60        ['\Grpc\Testing\SimpleResponse','decode'],
61        $metadata, $options);
62    }
63
64    /**
65     * Single-sided unbounded streaming from client to server
66     * The server returns the client payload as-is once the client does WritesDone
67     * @param array $metadata metadata
68     * @param array $options call options
69     */
70    public function StreamingFromClient($metadata = [], $options = []) {
71        return $this->_clientStreamRequest('/grpc.testing.BenchmarkService/StreamingFromClient',
72        ['\Grpc\Testing\SimpleResponse','decode'],
73        $metadata, $options);
74    }
75
76    /**
77     * Single-sided unbounded streaming from server to client
78     * The server repeatedly returns the client payload as-is
79     * @param \Grpc\Testing\SimpleRequest $argument input argument
80     * @param array $metadata metadata
81     * @param array $options call options
82     */
83    public function StreamingFromServer(\Grpc\Testing\SimpleRequest $argument,
84      $metadata = [], $options = []) {
85        return $this->_serverStreamRequest('/grpc.testing.BenchmarkService/StreamingFromServer',
86        $argument,
87        ['\Grpc\Testing\SimpleResponse', 'decode'],
88        $metadata, $options);
89    }
90
91    /**
92     * Two-sided unbounded streaming between server to client
93     * Both sides send the content of their own choice to the other
94     * @param array $metadata metadata
95     * @param array $options call options
96     */
97    public function StreamingBothWays($metadata = [], $options = []) {
98        return $this->_bidiRequest('/grpc.testing.BenchmarkService/StreamingBothWays',
99        ['\Grpc\Testing\SimpleResponse','decode'],
100        $metadata, $options);
101    }
102
103}
104