Name Date Size #Lines LOC

..--

BUILDH A D25-Apr-20251.1 KiB4036

CMakeLists.txtH A D25-Apr-20252.3 KiB7162

README.mdH A D25-Apr-2025987 3624

client.ccH A D25-Apr-20253.5 KiB10765

server.ccH A D25-Apr-20254.3 KiB13190

README.md

1# Deadline Example
2
3## Overview
4
5This example shows you how to use deadline when calling calls.
6
7### Try it!
8
9Once you have working gRPC, you can build this example using either bazel or cmake.
10
11Run the server, which will listen on port 50051:
12
13```sh
14$ ./server
15```
16
17Run the client (in a different terminal):
18
19```sh
20$ ./client
21```
22
23To simulate the test scenario, the test server implements following functionalities:
24- Response Delay: The server intentionally delays its response for `delay` request messages to induce timeout conditions.
25- Deadline Propagation: Upon receiving a request with the `[propagate me]` prefix, the server forwards it back to itselt.
26  This simulates the propagation of deadlines within the system.
27
28If things go smoothly, you will see the client output:
29
30```
31[Successful request] wanted = 0, got = 0
32[Exceeds deadline] wanted = 4, got = 4
33[Successful request with propagated deadline] wanted = 0, got = 0
34[Exceeds propagated deadline] wanted = 4, got = 4
35```
36