• Home
  • Raw
  • Download

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);
196 $deadline = Grpc\Timeval::infFuture();
201 $call = new Grpc\Call($this->channel,
206 Grpc\OP_SEND_INITIAL_METADATA => [],
207 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
208 Grpc\OP_SEND_MESSAGE => 'invalid',
217 $deadline = Grpc\Timeval::infFuture();
222 $call = new Grpc\Call($this->channel,
227 Grpc\OP_SEND_INITIAL_METADATA => [],
228 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
229 Grpc\OP_SEND_MESSAGE => ['message' => 0],
238 $deadline = Grpc\Timeval::infFuture();
243 $call = new Grpc\Call($this->channel,
248 Grpc\OP_SEND_INITIAL_METADATA => [],
249 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
250 Grpc\OP_SEND_MESSAGE => ['message' => 'abc',
261 $deadline = Grpc\Timeval::infFuture();
266 $call = new Grpc\Call($this->channel,
271 Grpc\OP_SEND_INITIAL_METADATA => [],
272 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
273 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
285 Grpc\OP_SEND_INITIAL_METADATA => [],
286 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
287 Grpc\OP_SEND_STATUS_FROM_SERVER => [
289 'code' => Grpc\STATUS_OK,
292 Grpc\OP_RECV_MESSAGE => true,
293 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
302 $deadline = Grpc\Timeval::infFuture();
307 $call = new Grpc\Call($this->channel,
312 Grpc\OP_SEND_INITIAL_METADATA => [],
313 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
314 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
326 Grpc\OP_SEND_INITIAL_METADATA => [],
327 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
328 Grpc\OP_SEND_STATUS_FROM_SERVER => [
333 Grpc\OP_RECV_MESSAGE => true,
334 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
343 $deadline = Grpc\Timeval::infFuture();
348 $call = new Grpc\Call($this->channel,
353 Grpc\OP_SEND_INITIAL_METADATA => [],
354 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
355 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
367 Grpc\OP_SEND_INITIAL_METADATA => [],
368 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
369 Grpc\OP_SEND_STATUS_FROM_SERVER => [
373 Grpc\OP_RECV_MESSAGE => true,
374 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
383 $deadline = Grpc\Timeval::infFuture();
388 $call = new Grpc\Call($this->channel,
393 Grpc\OP_SEND_INITIAL_METADATA => [],
394 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
395 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
407 Grpc\OP_SEND_INITIAL_METADATA => [],
408 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
409 Grpc\OP_SEND_STATUS_FROM_SERVER => [
411 'code' => Grpc\STATUS_OK,
414 Grpc\OP_RECV_MESSAGE => true,
415 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
424 $deadline = Grpc\Timeval::infFuture();
429 $call = new Grpc\Call($this->channel,
434 Grpc\OP_SEND_INITIAL_METADATA => [],
435 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
436 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
448 Grpc\OP_SEND_INITIAL_METADATA => [],
449 Grpc\OP_SEND_MESSAGE => ['message' => $reply_text],
450 Grpc\OP_SEND_STATUS_FROM_SERVER => [
452 'code' => Grpc\STATUS_OK,
454 Grpc\OP_RECV_MESSAGE => true,
455 Grpc\OP_RECV_CLOSE_ON_SERVER => true,
464 $deadline = Grpc\Timeval::infFuture();
469 $call = new Grpc\Call($this->channel,
483 $deadline = Grpc\Timeval::infFuture();
488 $call = new Grpc\Call($this->channel,
493 Grpc\OP_SEND_INITIAL_METADATA => [],
494 Grpc\OP_SEND_CLOSE_FROM_CLIENT => true,
495 Grpc\OP_SEND_MESSAGE => ['message' => $req_text],
496 Grpc\OP_SEND_STATUS_FROM_SERVER => [
498 'code' => Grpc\STATUS_OK,
512 Grpc\CHANNEL_IDLE);
518 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
520 $now = Grpc\Timeval::now();
521 $delta = new Grpc\Timeval(50000); // should timeout
531 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
533 $now = Grpc\Timeval::now();
534 $delta = new Grpc\Timeval(3000000); // should finish well before
547 $this->assertTrue($idle_state == Grpc\CHANNEL_IDLE);
549 $now = Grpc\Timeval::now();
550 $delta = new Grpc\Timeval(50000);
557 $this->assertTrue($new_state == Grpc\CHANNEL_IDLE);
566 new Grpc\Timeval()));
583 $this->channel = new Grpc\Channel('localhost:'.$this->port, null);