Skip to content

Commit

Permalink
php: fix examples ClientStub constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Mar 11, 2016
1 parent fbdf51b commit 7212f16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion examples/php/greeter_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
require dirname(__FILE__) . '/helloworld.php';

function greet($name) {
$client = new helloworld\GreeterClient('localhost:50051', []);
$client = new helloworld\GreeterClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure()
]);
$request = new helloworld\HelloRequest();
$request->setName($name);
list($reply, $status) = $client->SayHello($request)->wait();
Expand Down
4 changes: 3 additions & 1 deletion examples/php/route_guide/route_guide_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

define('COORD_FACTOR', 1e7);

$client = new routeguide\RouteGuideClient('localhost:50051', []);
$client = new routeguide\RouteGuideClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure()
]);

function printFeature($feature) {
$name = $feature->getName();
Expand Down

0 comments on commit 7212f16

Please sign in to comment.