aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/lib/Grpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/lib/Grpc')
-rw-r--r--src/php/lib/Grpc/AbstractCall.php2
-rw-r--r--src/php/lib/Grpc/BidiStreamingCall.php10
-rw-r--r--src/php/lib/Grpc/ClientStreamingCall.php8
-rw-r--r--src/php/lib/Grpc/ServerStreamingCall.php8
-rw-r--r--src/php/lib/Grpc/UnaryCall.php4
5 files changed, 16 insertions, 16 deletions
diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php
index 413d5966e1..1add972589 100644
--- a/src/php/lib/Grpc/AbstractCall.php
+++ b/src/php/lib/Grpc/AbstractCall.php
@@ -45,7 +45,7 @@ abstract class AbstractCall {
* @param string $method The method to call on the remote server
*/
public function __construct(Channel $channel, $method, $deserialize) {
- $this->call = new Call($channel, $method, Timeval::inf_future());
+ $this->call = new Call($channel, $method, Timeval::infFuture());
$this->deserialize = $deserialize;
$this->metadata = null;
}
diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php
index 2afceafce9..76c642bef4 100644
--- a/src/php/lib/Grpc/BidiStreamingCall.php
+++ b/src/php/lib/Grpc/BidiStreamingCall.php
@@ -43,7 +43,7 @@ class BidiStreamingCall extends AbstractCall {
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($metadata) {
- $this->call->start_batch([OP_SEND_INITIAL_METADATA => $metadata]);
+ $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
}
/**
@@ -55,7 +55,7 @@ class BidiStreamingCall extends AbstractCall {
if ($this->metadata === null) {
$batch[OP_RECV_INITIAL_METADATA] = true;
}
- $read_event = $this->call->start_batch($batch);
+ $read_event = $this->call->startBatch($batch);
if ($this->metadata === null) {
$this->metadata = $read_event->metadata;
}
@@ -68,14 +68,14 @@ class BidiStreamingCall extends AbstractCall {
* @param ByteBuffer $data The data to write
*/
public function write($data) {
- $this->call->start_batch([OP_SEND_MESSAGE => $data->serialize()]);
+ $this->call->startBatch([OP_SEND_MESSAGE => $data->serialize()]);
}
/**
* Indicate that no more writes will be sent.
*/
public function writesDone() {
- $this->call->start_batch([OP_SEND_CLOSE_FROM_CLIENT => true]);
+ $this->call->startBatch([OP_SEND_CLOSE_FROM_CLIENT => true]);
}
/**
@@ -84,7 +84,7 @@ class BidiStreamingCall extends AbstractCall {
* and array $metadata members
*/
public function getStatus() {
- $status_event = $this->call->start_batch([
+ $status_event = $this->call->startBatch([
OP_RECV_STATUS_ON_CLIENT => true
]);
return $status_event->status;
diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php
index ec585da985..61439d3f47 100644
--- a/src/php/lib/Grpc/ClientStreamingCall.php
+++ b/src/php/lib/Grpc/ClientStreamingCall.php
@@ -44,11 +44,11 @@ class ClientStreamingCall extends AbstractCall {
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg_iter, $metadata = array()) {
- $event = $this->call->start_batch([OP_SEND_INITIAL_METADATA => $metadata]);
+ $event = $this->call->startBatch([OP_SEND_INITIAL_METADATA => $metadata]);
foreach($arg_iter as $arg) {
- $this->call->start_batch([OP_SEND_MESSAGE => $arg->serialize()]);
+ $this->call->startBatch([OP_SEND_MESSAGE => $arg->serialize()]);
}
- $this->call->start_batch([OP_SEND_CLOSE_FROM_CLIENT => true]);
+ $this->call->startBatch([OP_SEND_CLOSE_FROM_CLIENT => true]);
}
/**
@@ -56,7 +56,7 @@ class ClientStreamingCall extends AbstractCall {
* @return [response data, status]
*/
public function wait() {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_RECV_INITIAL_METADATA => true,
OP_RECV_MESSAGE => true,
OP_RECV_STATUS_ON_CLIENT => true]);
diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php
index 574c1bb1e0..631c863345 100644
--- a/src/php/lib/Grpc/ServerStreamingCall.php
+++ b/src/php/lib/Grpc/ServerStreamingCall.php
@@ -44,7 +44,7 @@ class ServerStreamingCall extends AbstractCall {
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg, $metadata = array()) {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_SEND_INITIAL_METADATA => $metadata,
OP_RECV_INITIAL_METADATA => true,
OP_SEND_MESSAGE => $arg->serialize(),
@@ -56,10 +56,10 @@ class ServerStreamingCall extends AbstractCall {
* @return An iterator of response values
*/
public function responses() {
- $response = $this->call->start_batch([OP_RECV_MESSAGE => true])->message;
+ $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
while($response !== null) {
yield $this->deserializeResponse($response);
- $response = $this->call->start_batch([OP_RECV_MESSAGE => true])->message;
+ $response = $this->call->startBatch([OP_RECV_MESSAGE => true])->message;
}
}
@@ -69,7 +69,7 @@ class ServerStreamingCall extends AbstractCall {
* and array $metadata members
*/
public function getStatus() {
- $status_event = $this->call->start_batch([
+ $status_event = $this->call->startBatch([
OP_RECV_STATUS_ON_CLIENT => true
]);
return $status_event->status;
diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php
index 814d477697..97a10a40f4 100644
--- a/src/php/lib/Grpc/UnaryCall.php
+++ b/src/php/lib/Grpc/UnaryCall.php
@@ -44,7 +44,7 @@ class UnaryCall extends AbstractCall {
* @param array $metadata Metadata to send with the call, if applicable
*/
public function start($arg, $metadata = array()) {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_SEND_INITIAL_METADATA => $metadata,
OP_RECV_INITIAL_METADATA => true,
OP_SEND_MESSAGE => $arg->serialize(),
@@ -57,7 +57,7 @@ class UnaryCall extends AbstractCall {
* @return [response data, status]
*/
public function wait() {
- $event = $this->call->start_batch([
+ $event = $this->call->startBatch([
OP_RECV_MESSAGE => true,
OP_RECV_STATUS_ON_CLIENT => true]);
return array($this->deserializeResponse($event->message), $event->status);