Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
0607bae8
Commit
0607bae8
authored
9 years ago
by
Jorge Canizales
Browse files
Options
Downloads
Patches
Plain Diff
Forward-declare grpc_channel and specify ownership semantics
parent
7d261ee5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/objective-c/GRPCClient/private/GRPCChannel.h
+5
-3
5 additions, 3 deletions
src/objective-c/GRPCClient/private/GRPCChannel.h
src/objective-c/GRPCClient/private/GRPCChannel.m
+2
-0
2 additions, 0 deletions
src/objective-c/GRPCClient/private/GRPCChannel.m
with
7 additions
and
3 deletions
src/objective-c/GRPCClient/private/GRPCChannel.h
+
5
−
3
View file @
0607bae8
...
...
@@ -33,12 +33,14 @@
#import <Foundation/Foundation.h>
#include
<grpc/grpc.h>
struct
grpc_channel
;
// Each separate instance of this class represents at least one TCP connection to the provided host.
// Create them using one of the subclasses |GRPCSecureChannel| and |GRPCUnsecuredChannel|.
@interface
GRPCChannel
:
NSObject
@property
(
nonatomic
,
readonly
)
grpc_channel
*
unmanagedChannel
;
@property
(
nonatomic
,
readonly
)
struct
grpc_channel
*
unmanagedChannel
;
-
(
instancetype
)
initWithChannel
:(
grpc_channel
*
)
unmanagedChannel
NS_DESIGNATED_INITIALIZER
;
// This initializer takes ownership of the passed channel, and will destroy it when this object is
// deallocated. It's illegal to pass the same grpc_channel to two different GRPCChannel objects.
-
(
instancetype
)
initWithChannel
:(
struct
grpc_channel
*
)
unmanagedChannel
NS_DESIGNATED_INITIALIZER
;
@end
This diff is collapsed.
Click to expand it.
src/objective-c/GRPCClient/private/GRPCChannel.m
+
2
−
0
View file @
0607bae8
...
...
@@ -33,6 +33,8 @@
#import "GRPCChannel.h"
#include
<grpc/grpc.h>
@implementation
GRPCChannel
-
(
instancetype
)
init
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment