From df9753d98a072d981fc6057db3d7ed53ebd2f473 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 14 Jun 2018 16:50:38 -0700 Subject: [PATCH 1/3] CFStream usage guide --- src/objective-c/README-CFSTREAM.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/objective-c/README-CFSTREAM.md diff --git a/src/objective-c/README-CFSTREAM.md b/src/objective-c/README-CFSTREAM.md new file mode 100644 index 00000000000..3186dfed844 --- /dev/null +++ b/src/objective-c/README-CFSTREAM.md @@ -0,0 +1,32 @@ +[![Cocoapods](https://img.shields.io/cocoapods/v/gRPC.svg)](https://cocoapods.org/pods/gRPC) +# gRPC Objective-C with CFStream + +gRPC Objective-C library now provides the option to use Apple's CFStream API (rather than TCP +sockets) for networking. Using CFStream resolves a bunch of network connectivity transition issues +(see the [doc](https://github.com/grpc/grpc/blob/master/src/objective-c/NetworkBehavior.md) for more +information). + +CFStream integration is now in experimental state. You will need explicit opt-in to use it to get +the benefits of resolving the issues above. We expect to make CFStream the default networking +interface that gRPC uses when it is ready for production. + +## Usage +If you use gRPC following the instruction of +[README.md](https://github.com/grpc/grpc/blob/master/src/objective-c/README.md): +- Simply replace the +dependency on `gRPC-ProtoRPC` with `gRPC-ProtoRPC/CFStream`. The build system will take care of +everything else and switch networking to CFStream. + +If your project directly depends on podspecs other than `gRPC-ProtoRPC` (e.g. `gRPC` or +`gRPC-Core`): + +- Make your projects depend on subspecs corresponding to CFStream in each gRPC podspec. For + `gRPC-Core`, you will need to make sure that the completion queue you create is of type + `GRPC_CQ_NON_POLLING`. This behavior is expected to be changed soon during the experimantal so + that you do not have to modify the completion queue type. + +## Notes + +- Currently we do not support on platforms other than iOS, although it is likely that this + integration can run on MacOS targets with Apple's compiler. +- Let us know if you meet any issue by filing issue and ping @muxi. From 29301f74b07aaedc5926dc2d0269e3d4ccda9567 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 18 Jun 2018 10:09:33 -0700 Subject: [PATCH 2/3] Changes following the comments --- src/objective-c/README-CFSTREAM.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/objective-c/README-CFSTREAM.md b/src/objective-c/README-CFSTREAM.md index 3186dfed844..1e510d4cd0f 100644 --- a/src/objective-c/README-CFSTREAM.md +++ b/src/objective-c/README-CFSTREAM.md @@ -11,7 +11,7 @@ the benefits of resolving the issues above. We expect to make CFStream the defau interface that gRPC uses when it is ready for production. ## Usage -If you use gRPC following the instruction of +If you use gRPC following the instructions in [README.md](https://github.com/grpc/grpc/blob/master/src/objective-c/README.md): - Simply replace the dependency on `gRPC-ProtoRPC` with `gRPC-ProtoRPC/CFStream`. The build system will take care of @@ -22,11 +22,11 @@ If your project directly depends on podspecs other than `gRPC-ProtoRPC` (e.g. `g - Make your projects depend on subspecs corresponding to CFStream in each gRPC podspec. For `gRPC-Core`, you will need to make sure that the completion queue you create is of type - `GRPC_CQ_NON_POLLING`. This behavior is expected to be changed soon during the experimantal so - that you do not have to modify the completion queue type. + `GRPC_CQ_NON_POLLING`. This is expected to be fixed soon so that you do not have to modify the + completion queue type. ## Notes -- Currently we do not support on platforms other than iOS, although it is likely that this - integration can run on MacOS targets with Apple's compiler. +- Currently we do not support platforms other than iOS, although it is likely that this integration + can run on MacOS targets with Apple's compiler. - Let us know if you meet any issue by filing issue and ping @muxi. From ec1c014413537a59b091906203243327e1db0082 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 26 Jun 2018 12:52:29 -0700 Subject: [PATCH 3/3] Update link to network transition behavior doc --- src/objective-c/README-CFSTREAM.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/README-CFSTREAM.md b/src/objective-c/README-CFSTREAM.md index 1e510d4cd0f..0b5215a7b3b 100644 --- a/src/objective-c/README-CFSTREAM.md +++ b/src/objective-c/README-CFSTREAM.md @@ -3,8 +3,8 @@ gRPC Objective-C library now provides the option to use Apple's CFStream API (rather than TCP sockets) for networking. Using CFStream resolves a bunch of network connectivity transition issues -(see the [doc](https://github.com/grpc/grpc/blob/master/src/objective-c/NetworkBehavior.md) for more -information). +(see the [doc](https://github.com/grpc/grpc/blob/master/src/objective-c/NetworkTransitionBehavior.md) +for more information). CFStream integration is now in experimental state. You will need explicit opt-in to use it to get the benefits of resolving the issues above. We expect to make CFStream the default networking