|
|
@ -36,7 +36,9 @@ require dirname(__FILE__) . '/vendor/autoload.php'; |
|
|
|
require dirname(__FILE__) . '/helloworld.php'; |
|
|
|
require dirname(__FILE__) . '/helloworld.php'; |
|
|
|
|
|
|
|
|
|
|
|
function greet($name) { |
|
|
|
function greet($name) { |
|
|
|
$client = new helloworld\GreeterClient('localhost:50051', []); |
|
|
|
$client = new helloworld\GreeterClient('localhost:50051', [ |
|
|
|
|
|
|
|
'credentials' => Grpc\ChannelCredentials::createInsecure() |
|
|
|
|
|
|
|
]); |
|
|
|
$request = new helloworld\HelloRequest(); |
|
|
|
$request = new helloworld\HelloRequest(); |
|
|
|
$request->setName($name); |
|
|
|
$request->setName($name); |
|
|
|
list($reply, $status) = $client->SayHello($request)->wait(); |
|
|
|
list($reply, $status) = $client->SayHello($request)->wait(); |
|
|
|