[GRPC] Support abstract socket and an connected fd

This CL is an re-implementation of commit 35dd92ca0c464fea9cf41ba7e49e9ab34f361366
while gRPC is being upgraded to 1.22.0.

This CL adds special handling for Android Studio Profilers and
Transport Pipeline in general.

(1) Supports Unix abstract domain socket if the input address starts
with prefix "unix:@". For example, "unix:@hidden" indicates an
abstract socket of name 'hidden'. Note the name of the abstract
socket doesn't include the '@' immediately after "unix:".
Abstract socket supports both server and client modes.

(2) Supports a GRPC client to use an existing socket if the file
descriptor as an integer is provided in the format of "unix:&FD".
For example, "unix:&123" indicates a socket of file descriptor
'123' exists and is going to be used. Existing socket's file
descriptor is supported only in clients.

Bug: 138846475
Test: will add unit tests in a follow up CL
Change-Id: I433df6eae990253b713b10f42d5acfe920e102f1
3 files changed
tree: 4ed3f0c1bef9090f5166ab2151dcbcdaaa046518
  1. .bazelrc
  2. .clang-format
  3. .clang-tidy
  4. .clang_complete
  5. .editorconfig
  6. .github/
  7. .gitignore
  8. .gitmodules
  9. .istanbul.yml
  10. .pylintrc
  11. .pylintrc-examples
  12. .pylintrc-tests
  13. .rspec
  14. .travis.yml
  15. .yardopts
  17. BUILD
  18. BUILD.gn
  19. BUILDING.md
  20. CMakeLists.txt
  22. CONCEPTS.md
  24. Gemfile
  26. MANIFEST.md
  27. Makefile
  28. NOTICE.txt
  29. OWNERS
  31. README.md
  32. Rakefile
  35. bazel/
  36. build.yaml
  37. build_config.rb
  38. cmake/
  39. composer.json
  40. config.m4
  41. config.w32
  42. doc/
  43. etc/
  44. examples/
  45. gRPC-C++.podspec
  46. gRPC-Core.podspec
  47. gRPC-ProtoRPC.podspec
  48. gRPC-RxLibrary.podspec
  49. gRPC.podspec
  50. grpc.bzl
  51. grpc.def
  52. grpc.gemspec
  53. grpc.gyp
  54. include/
  55. package.xml
  56. requirements.bazel.txt
  57. requirements.txt
  58. setup.cfg
  59. setup.py
  60. src/
  61. summerofcode/
  62. templates/
  63. test/
  64. third_party/
  65. tools/

gRPC - An RPC library and framework

gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.

Join the chat at https://gitter.im/grpc/grpc

To start using gRPC

To maximize usability, gRPC supports the standard method for adding dependencies to a user‘s chosen language (if there is one). In most languages, the gRPC runtime comes as a package available in a user’s language package manager.

For instructions on how to use the language-specific gRPC runtime for a project, please refer to these documents

  • C++: follow the instructions under the src/cpp directory
  • C#: NuGet package Grpc
  • Dart: pub package grpc
  • Go: go get google.golang.org/grpc
  • Java: Use JARs from Maven Central Repository
  • Node: npm install grpc
  • Objective-C: Add gRPC-ProtoRPC dependency to podspec
  • PHP: pecl install grpc
  • Python: pip install grpcio
  • Ruby: gem install grpc
  • WebJS: follow the grpc-web instructions

Per-language quickstart guides and tutorials can be found in the documentation section on the grpc.io website. Code examples are available in the examples directory.

Precompiled bleeding-edge package builds of gRPC master branch's HEAD are uploaded daily to packages.grpc.io.

To start developing gRPC

Contributions are welcome!

Please read How to contribute which will guide you through the entire workflow of how to build the source code, how to run the tests, and how to contribute changes to the gRPC codebase. The “How to contribute” document also contains info on how the contribution process works and contains best practices for creating contributions.


Sometimes things go wrong. Please check out the Troubleshooting guide if you are experiencing issues with gRPC.


See the Performance dashboard for performance numbers of the latest released version.


See gRPC Concepts

About This Repository

This repository contains source code for gRPC libraries implemented in multiple languages written on top of a shared C core library src/core.

Libraries in different languages may be in various states of development. We are seeking contributions for all of these libraries:

Shared C [core library]src/core
LanguageSource repo