tree: 06cbcf8e0c026ee6a7a2ef83bd4a57e1c0e0c567 [path history] [tgz]
  1. BUILD
  2. client.cc
  3. README.md
  4. server.cc
examples/cpp/unix_abstract_sockets/README.md

gRPC Unix Abstract Socket Example

This example shows how to use gRPC with Unix domain sockets in the abstract namespace. gRPC uses the unix-abstract:abstract_path URI scheme to support this. In this example, an socket with an embedded null character grpc%00abstract is created.

Build and run the example

Run bazel run :server in one terminal, and bazel run :client in another.

The client and server will confirm that a message was sent and received on both ends. The server will continue running until it is shut down. While the server is still running, you can confirm that a unix domain socket is in use by running lsof -U | grep '@grpc@abstract'.