46 lines
970 B
Markdown
46 lines
970 B
Markdown
[LibIPC][libipc] C examples: `pong` and `pongd` (simple service and its
|
|
client, just echoing received messages).
|
|
Implementations are straightforward.
|
|
|
|
## Build
|
|
|
|
`make`
|
|
|
|
Some options are available, such as static builds.
|
|
|
|
```sh
|
|
make STATIC=1 # Build static executables.
|
|
```
|
|
|
|
## Usage
|
|
|
|
```sh
|
|
./pongd # run the service
|
|
./pong # run the client
|
|
```
|
|
|
|
# Using `pong` and `pongd` as debug tools for libipc
|
|
|
|
In case you want to use your own version of libipc, first compile your
|
|
libipc with `--release=fast` or `--release=small` optimization flags
|
|
(as these options remove some zig-related code in the final binary),
|
|
then you can compile these tools as is:
|
|
|
|
```sh
|
|
make STATIC=1 LDFLAGS=/path/to/your/libipc.a
|
|
```
|
|
|
|
Then you can run the applications with valgrind if you want:
|
|
|
|
```sh
|
|
make USE_VALGRIND=1 run-server
|
|
make USE_VALGRIND=1 run-client
|
|
```
|
|
|
|
See the makefiles in `../mk/` for additional options.
|
|
|
|
## LICENSE
|
|
|
|
ISC
|
|
|
|
[libipc]: https://git.baguette.netlib.re/Baguette/libipc
|