Lines Matching refs:Grpc
23 $this->server = new Grpc\Server([]);
25 $this->channel = new Grpc\Channel('localhost:'.$this->port, [
39 $deadline = Grpc\Timeval::infFuture();
41 $call = new Grpc\Call($this->channel,
46 Grpc\OP_SEND_INITIAL_METADATA => [],
47 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
58 Grpc\OP_SEND_INITIAL_METADATA => [],
59 Grpc\OP_SEND_STATUS_FROM_SERVER => [
61 'code' => Grpc\STATUS_OK,
64 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
72 Grpc\OP_RECV_INITIAL_METADATA => true,
73 Grpc\OP_RECV_STATUS_ON_CLIENT => true,
78 $this->assertSame(Grpc\STATUS_OK, $status->code);
87 $deadline = Grpc\Timeval::infFuture();
90 $call = new Grpc\Call($this->channel,
95 Grpc\OP_SEND_INITIAL_METADATA => [],
96 Grpc\OP_SEND_MESSAGE => ['message' => $req_text,
97 'flags' => Grpc\WRITE_NO_COMPRESS, ],
98 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
109 Grpc\OP_SEND_INITIAL_METADATA => [],
110 Grpc\OP_SEND_STATUS_FROM_SERVER => [
112 'code' => Grpc\STATUS_OK,
118 Grpc\OP_RECV_INITIAL_METADATA => true,
119 Grpc\OP_RECV_STATUS_ON_CLIENT => true,
124 $this->assertSame(Grpc\STATUS_OK, $status->code);
133 $deadline = Grpc\Timeval::infFuture();
138 $call = new Grpc\Call($this->channel,
143 Grpc\OP_SEND_INITIAL_METADATA => [],
144 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
145 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
157 Grpc\OP_SEND_INITIAL_METADATA => [],
158 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
159 Grpc\OP_SEND_STATUS_FROM_SERVER => [
161 'code' => Grpc\STATUS_OK,
164 Grpc\OP_RECV_MESSAGE => true,
165 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
175 Grpc\OP_RECV_INITIAL_METADATA => true,
176 Grpc\OP_RECV_MESSAGE => true,
177 Grpc\OP_RECV_STATUS_ON_CLIENT => true,
184 $this->assertSame(Grpc\STATUS_OK, $status->code);
194 $deadline = Grpc\Timeval::infFuture();
199 $call = new Grpc\Call($this->channel,
204 Grpc\OP_SEND_INITIAL_METADATA => [],
205 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
206 Grpc\OP_SEND_MESSAGE => 'invalid',
213 $deadline = Grpc\Timeval::infFuture();
218 $call = new Grpc\Call($this->channel,
223 Grpc\OP_SEND_INITIAL_METADATA => [],
224 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
225 Grpc\OP_SEND_MESSAGE => ['message' => 0],
232 $deadline = Grpc\Timeval::infFuture();
237 $call = new Grpc\Call($this->channel,
242 Grpc\OP_SEND_INITIAL_METADATA => [],
243 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
244 Grpc\OP_SEND_MESSAGE => ['message' => 'abc',
253 $deadline = Grpc\Timeval::infFuture();
258 $call = new Grpc\Call($this->channel,
263 Grpc\OP_SEND_INITIAL_METADATA => [],
264 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
265 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
277 Grpc\OP_SEND_INITIAL_METADATA => [],
278 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
279 Grpc\OP_SEND_STATUS_FROM_SERVER => [
281 'code' => Grpc\STATUS_OK,
284 Grpc\OP_RECV_MESSAGE => true,
285 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
292 $deadline = Grpc\Timeval::infFuture();
297 $call = new Grpc\Call($this->channel,
302 Grpc\OP_SEND_INITIAL_METADATA => [],
303 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
304 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
316 Grpc\OP_SEND_INITIAL_METADATA => [],
317 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
318 Grpc\OP_SEND_STATUS_FROM_SERVER => [
323 Grpc\OP_RECV_MESSAGE => true,
324 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
331 $deadline = Grpc\Timeval::infFuture();
336 $call = new Grpc\Call($this->channel,
341 Grpc\OP_SEND_INITIAL_METADATA => [],
342 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
343 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
355 Grpc\OP_SEND_INITIAL_METADATA => [],
356 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
357 Grpc\OP_SEND_STATUS_FROM_SERVER => [
361 Grpc\OP_RECV_MESSAGE => true,
362 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
369 $deadline = Grpc\Timeval::infFuture();
374 $call = new Grpc\Call($this->channel,
379 Grpc\OP_SEND_INITIAL_METADATA => [],
380 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
381 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
393 Grpc\OP_SEND_INITIAL_METADATA => [],
394 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
395 Grpc\OP_SEND_STATUS_FROM_SERVER => [
397 'code' => Grpc\STATUS_OK,
400 Grpc\OP_RECV_MESSAGE => true,
401 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
408 $deadline = Grpc\Timeval::infFuture();
413 $call = new Grpc\Call($this->channel,
418 Grpc\OP_SEND_INITIAL_METADATA => [],
419 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
420 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
432 Grpc\OP_SEND_INITIAL_METADATA => [],
433 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
434 Grpc\OP_SEND_STATUS_FROM_SERVER => [
436 'code' => Grpc\STATUS_OK,
438 Grpc\OP_RECV_MESSAGE => true,
439 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
446 $deadline = Grpc\Timeval::infFuture();
451 $call = new Grpc\Call($this->channel,
463 $deadline = Grpc\Timeval::infFuture();
468 $call = new Grpc\Call($this->channel,
473 Grpc\OP_SEND_INITIAL_METADATA => [],
474 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
475 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
476 Grpc\OP_SEND_STATUS_FROM_SERVER => [
478 'code' => Grpc\STATUS_OK,
492 Grpc\CHANNEL_IDLE);
498 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
500 $now = Grpc\Timeval::now();
501 $delta = new Grpc\Timeval(50000); // should timeout
511 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
513 $now = Grpc\Timeval::now();
514 $delta = new Grpc\Timeval(3000000); // should finish well before
527 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
529 $now = Grpc\Timeval::now();
530 $delta = new Grpc\Timeval(50000);
537 $this->assertTrue($new_state == Grpc\CHANNEL_IDLE);
544 new Grpc\Timeval()));
557 $this->channel = new Grpc\Channel('localhost:'.$this->port, null);