Grpc\ChannelCredentials::createInsecure(), ]); // unary call $request = new Grpc\Gateway\Testing\EchoRequest(); $request->setMessage("Hello World!"); list($response, $status) = $client->Echo($request)->wait(); echo $response->getMessage()."\n"; // server streaming call $stream_request = new Grpc\Gateway\Testing\ServerStreamingEchoRequest(); $stream_request->setMessage("stream message"); $stream_request->setMessageCount(5); $responses = $client->ServerStreamingEcho($stream_request)->responses(); foreach ($responses as $response) { echo $response->getMessage()."\n"; }