#import <GRPCCallLegacy.h>
Instance Methods | |
(instancetype) | - initWithHost:path:callSafety:requestsWriter:callOptions:writeDone: |
(instancetype) | - NS_UNAVAILABLE |
(void) | - receiveNextMessages: |
![]() | |
(void) | - finishWithError: |
(GRXWriter *) | - map: |
(void) | - startWithWriteable: |
Properties | |
NSString * | oauth2AccessToken |
NSString * | oauth2ChallengeHeader |
id< GRPCAuthorizationProtocol > | tokenProvider |
![]() | |
GRXWriterState | state |
NSMutableDictionary * | requestHeaders |
NSDictionary * | responseHeaders |
NSDictionary * | responseTrailers |
NSString * | serverName |
NSTimeInterval | timeout |
(instancetype) | - initWithHost:path:requestsWriter: |
(void) | - cancel |
(void) | - setResponseDispatchQueue: |
(void) | + setCallSafety:host:path: |
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.
- (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.
+ (stream_engine*) cronetEngine |
Provided by category GRPCCall(Cronet).
+ ("The API for this feature is experimental, " "and might be removed or modified at any " "time.") DEPRECATED_MSG_ATTRIBUTE |
Provided by category GRPCCall(ChannelArg).
+ (void) enableRetry: | (BOOL) | enabled | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
- (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).
- (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".
+ (BOOL) isUsingCronet |
Provided by category GRPCCall(Cronet).
- (instancetype) NS_UNAVAILABLE |
- (void) receiveNextMessages: | (NSUInteger) | numberOfMessages |
Provided by category GRPCCall(V2API).
+ (void) resetHostSettings |
Provided by category GRPCCall(Tests).
+ (void) setCallSafety: | (GRPCCallSafety) | callSafety | |
host: | (NSString *) | host | |
path: | (NSString *) | path | |
The following methods are deprecated.
+ (void) setDefaultCompressMethod: | (GRPCCompressAlgorithm) | algorithm | |
forhost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
+ (void) setKeepaliveWithInterval: | (int) | interval | |
timeout: | (int) | timeout | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
+ (void) setMinConnectTimeout: | (unsigned int) | timeout | |
initialBackoff: | (unsigned int) | initialBackoff | |
maxBackoff: | (unsigned int) | maxBackoff | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
- (void) setResponseDispatchQueue: | (dispatch_queue_t) | queue |
+ (void) setResponseSizeLimit: | (NSUInteger) | limit | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
+ (BOOL) setTLSPEMRootCerts: | (nullable NSString *) | pemRootCert | |
forHost: | (nonnull NSString *) | host | |
error: | (NSError *_Nullable *_Nullable) | errorPtr | |
Provided by category GRPCCall(ChannelCredentials).
+ (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).
+ (void) setUserAgentPrefix: | (nonnull NSString *) | userAgentPrefix | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
+ (void) setUserAgentSuffix: | (nonnull NSString *) | userAgentSuffix | |
forHost: | (nonnull NSString *) | host | |
Provided by category GRPCCall(ChannelArg).
+ (void) useCronetWithEngine: | (stream_engine *) | engine |
Provided by category GRPCCall(Cronet).
+ (void) useInsecureConnectionsForHost: | (NSString *) | host |
Provided by category GRPCCall(Tests).
+ (void) useTestCertsPath: | (NSString *) | certsPath | |
testName: | (NSString *) | testName | |
forHost: | (NSString *) | host | |
Provided by category GRPCCall(Tests).
|
readwriteatomiccopy |
Provided by category GRPCCall(OAuth2).
Definition at line 29 of file GRPCCall+OAuth2.h.
|
readatomiccopy |
Provided by category GRPCCall(OAuth2).
Definition at line 30 of file GRPCCall+OAuth2.h.
|
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.
|
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.
|
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.
|
readwriteatomiccopy |
Definition at line 105 of file GRPCCallLegacy.h.
|
readwriteatomic |
Definition at line 106 of file GRPCCallLegacy.h.
|
readwriteatomicstrong |
Provided by category GRPCCall(OAuth2).
Definition at line 31 of file GRPCCall+OAuth2.h.