Instance Methods | Class Methods | Properties | List of all members
GRPCCall Class Reference

#import <GRPCCallLegacy.h>

Inheritance diagram for GRPCCall:
Inheritance graph
[legend]

Instance Methods

(instancetype) - initWithHost:path:callSafety:requestsWriter:callOptions:writeDone:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - receiveNextMessages:
 
- Instance Methods inherited from GRXWriter
(void) - finishWithError:
 
(GRXWriter *) - map:
 
(void) - startWithWriteable:
 

Class Methods

(stream_engine *) + cronetEngine
 
("The API for this feature is experimental, " "and might be removed or modified at any " "time.") + DEPRECATED_MSG_ATTRIBUTE
 
(void) + enableRetry:forHost:
 
(BOOL+ isUsingCronet
 
(void) + resetHostSettings
 
(void) + setDefaultCompressMethod:forhost:
 
(void) + setKeepaliveWithInterval:timeout:forHost:
 
(void) + setMinConnectTimeout:initialBackoff:maxBackoff:forHost:
 
(void) + setResponseSizeLimit:forHost:
 
(BOOL+ setTLSPEMRootCerts:forHost:error:
 
(BOOL+ setTLSPEMRootCerts:withPrivateKey:withCertChain:forHost:error:
 
(void) + setUserAgentPrefix:forHost:
 
(void) + setUserAgentSuffix:forHost:
 
(void) + useCronetWithEngine:
 
(void) + useInsecureConnectionsForHost:
 
(void) + useTestCertsPath:testName:forHost:
 
- Class Methods inherited from GRXWriter
(instancetype) + emptyWriter
 
(instancetype) + writerWithContainer:
 
(instancetype) + writerWithEnumerator:
 
(instancetype) + writerWithError:
 
(instancetype) + writerWithValue:
 
(instancetype) + writerWithValueSupplier:
 

Properties

NSString * oauth2AccessToken
 
NSString * oauth2ChallengeHeader
 
id< GRPCAuthorizationProtocoltokenProvider
 
- Properties inherited from GRXWriter
GRXWriterState state
 
NSMutableDictionary * requestHeaders
 
NSDictionary * responseHeaders
 
NSDictionary * responseTrailers
 
NSString * serverName
 
NSTimeInterval timeout
 
(instancetype) - initWithHost:path:requestsWriter:
 
(void) - cancel
 
(void) - setResponseDispatchQueue:
 
(void) + setCallSafety:host:path:
 

Detailed Description

This is the legacy interface of this gRPC library. This API is deprecated and users should use GRPCCall2 in GRPCCall.h. This API exists solely for the purpose of backwards compatibility. Represents a single gRPC remote call.

Definition at line 30 of file GRPCCallLegacy.h.

Method Documentation

◆ cancel

- (void) cancel

Finishes the request side of this call, notifies the server that the RPC should be cancelled, and finishes the response side of the call with an error of code CANCELED.

◆ cronetEngine

+ (stream_engine*) cronetEngine

Provided by category GRPCCall(Cronet).

◆ DEPRECATED_MSG_ATTRIBUTE

+ ("The API for this feature is experimental, " "and might be removed or modified at any " "time.") DEPRECATED_MSG_ATTRIBUTE

Provided by category GRPCCall(ChannelArg).

◆ enableRetry:forHost:

+ (void) enableRetry: (BOOL enabled
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ initWithHost:path:callSafety:requestsWriter:callOptions:writeDone:

- (instancetype) initWithHost: (NSString *)  host
path: (NSString *)  path
callSafety: (GRPCCallSafety)  safety
requestsWriter: (GRXWriter *)  requestsWriter
callOptions: (GRPCCallOptions *)  callOptions
writeDone: (void(^)(void))  writeDone 

Provided by category GRPCCall(V2API).

◆ initWithHost:path:requestsWriter:

- (instancetype) initWithHost: (NSString *)  host
path: (NSString *)  path
requestsWriter: (GRXWriter *)  requestWriter 

The request writer has to write NSData objects into the provided Writeable. The server will receive each of those separately and in order as distinct messages. A gRPC call might not complete until the request writer finishes. On the other hand, the request finishing doesn't necessarily make the call to finish, as the server might continue sending messages to the response side of the call indefinitely (depending on the semantics of the specific remote method called). To finish a call right away, invoke cancel. host parameter should not contain the scheme (http:// or https://), only the name or IP addr and the port number, for example "localhost:5050".

◆ isUsingCronet

+ (BOOL) isUsingCronet

Provided by category GRPCCall(Cronet).

◆ NS_UNAVAILABLE

- (instancetype) NS_UNAVAILABLE

◆ receiveNextMessages:

- (void) receiveNextMessages: (NSUInteger)  numberOfMessages

Provided by category GRPCCall(V2API).

◆ resetHostSettings

+ (void) resetHostSettings

Provided by category GRPCCall(Tests).

◆ setCallSafety:host:path:

+ (void) setCallSafety: (GRPCCallSafety)  callSafety
host: (NSString *)  host
path: (NSString *)  path 

The following methods are deprecated.

◆ setDefaultCompressMethod:forhost:

+ (void) setDefaultCompressMethod: (GRPCCompressAlgorithm algorithm
forhost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ setKeepaliveWithInterval:timeout:forHost:

+ (void) setKeepaliveWithInterval: (int interval
timeout: (int timeout
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ setMinConnectTimeout:initialBackoff:maxBackoff:forHost:

+ (void) setMinConnectTimeout: (unsigned int timeout
initialBackoff: (unsigned int initialBackoff
maxBackoff: (unsigned int maxBackoff
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ setResponseDispatchQueue:

- (void) setResponseDispatchQueue: (dispatch_queue_t)  queue

◆ setResponseSizeLimit:forHost:

+ (void) setResponseSizeLimit: (NSUInteger)  limit
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ setTLSPEMRootCerts:forHost:error:

+ (BOOL) setTLSPEMRootCerts: (nullable NSString *)  pemRootCert
forHost: (nonnull NSString *)  host
error: (NSError *_Nullable *_Nullable)  errorPtr 

Provided by category GRPCCall(ChannelCredentials).

◆ setTLSPEMRootCerts:withPrivateKey:withCertChain:forHost:error:

+ (BOOL) setTLSPEMRootCerts: (nullable NSString *)  pemRootCerts
withPrivateKey: (nullable NSString *)  pemPrivateKey
withCertChain: (nullable NSString *)  pemCertChain
forHost: (nonnull NSString *)  host
error: (NSError *_Nullable *_Nullable)  errorPtr 

Provided by category GRPCCall(ChannelCredentials).

◆ setUserAgentPrefix:forHost:

+ (void) setUserAgentPrefix: (nonnull NSString *)  userAgentPrefix
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ setUserAgentSuffix:forHost:

+ (void) setUserAgentSuffix: (nonnull NSString *)  userAgentSuffix
forHost: (nonnull NSString *)  host 

Provided by category GRPCCall(ChannelArg).

◆ useCronetWithEngine:

+ (void) useCronetWithEngine: (stream_engine *)  engine

Provided by category GRPCCall(Cronet).

◆ useInsecureConnectionsForHost:

+ (void) useInsecureConnectionsForHost: (NSString *)  host

Provided by category GRPCCall(Tests).

◆ useTestCertsPath:testName:forHost:

+ (void) useTestCertsPath: (NSString *)  certsPath
testName: (NSString *)  testName
forHost: (NSString *)  host 

Provided by category GRPCCall(Tests).

Property Documentation

◆ oauth2AccessToken

- (NSString*) oauth2AccessToken
readwriteatomiccopy

Provided by category GRPCCall(OAuth2).

Definition at line 29 of file GRPCCall+OAuth2.h.

◆ oauth2ChallengeHeader

- (NSString*) oauth2ChallengeHeader
readatomiccopy

Provided by category GRPCCall(OAuth2).

Definition at line 30 of file GRPCCall+OAuth2.h.

◆ requestHeaders

- (NSMutableDictionary*) requestHeaders
readatomicassign

The container of the request headers of an RPC conforms to this protocol, which is a subset of NSMutableDictionary's interface. It will become a NSMutableDictionary later on. The keys of this container are the header names, which per the HTTP standard are case- insensitive. They are stored in lowercase (which is how HTTP/2 mandates them on the wire), and can only consist of ASCII characters. A header value is a NSString object (with only ASCII characters), unless the header name has the suffix "-bin", in which case the value has to be a NSData object. These HTTP headers will be passed to the server as part of this call. Each HTTP header is a name-value pair with string names and either string or binary values.

The passed dictionary has to use NSString keys, corresponding to the header names. The value associated to each can be a NSString object or a NSData object. E.g.:

call.requestHeaders ="authorization": @"Bearer ..."};

call.requestHeaders["my-header-bin"] = someData;

After the call is started, trying to modify this property is an error.

The property is initialized to an empty NSMutableDictionary.

Definition at line 58 of file GRPCCallLegacy.h.

◆ responseHeaders

- (NSDictionary*) responseHeaders
readatomiccopy

This dictionary is populated with the HTTP headers received from the server. This happens before any response message is received from the server. It has the same structure as the request headers dictionary: Keys are NSString header names; names ending with the suffix "-bin" have a NSData value; the others have a NSString value.

The value of this property is nil until all response headers are received, and will change before any of -writeValue: or -writesFinishedWithError: are sent to the writeable.

Definition at line 69 of file GRPCCallLegacy.h.

◆ responseTrailers

- (NSDictionary*) responseTrailers
readatomiccopy

Same as responseHeaders, but populated with the HTTP trailers received from the server before the call finishes.

The value of this property is nil until all response trailers are received, and will change before -writesFinishedWithError: is sent to the writeable.

Definition at line 78 of file GRPCCallLegacy.h.

◆ serverName

- (NSString*) serverName
readwriteatomiccopy

Definition at line 105 of file GRPCCallLegacy.h.

◆ timeout

- (NSTimeInterval) timeout
readwriteatomic

Definition at line 106 of file GRPCCallLegacy.h.

◆ tokenProvider

- (id<GRPCAuthorizationProtocol>) tokenProvider
readwriteatomicstrong

Provided by category GRPCCall(OAuth2).

Definition at line 31 of file GRPCCall+OAuth2.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:46