This is the legacy interface of this gRPC library.
More...
#import <GRPCCallLegacy.h>
|
(instancetype) | - NS_UNAVAILABLE |
|
(void) | - startWithWriteable: |
| Transition to the Started state, and start sending messages to the writeable (a reference to it is retained). More...
|
|
(void) | - finishWithError: |
| Send writesFinishedWithError:errorOrNil to the writeable. More...
|
|
(GRXWriter *) | - map: |
| Returns a writer that wraps the receiver, and has all the values the receiver would write transformed by the provided mapping function. More...
|
|
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.
◆ 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.
◆ DEPRECATED_MSG_ATTRIBUTE
+ ("The API for this feature is experimental, " "and might be removed or modified at any " "time.") DEPRECATED_MSG_ATTRIBUTE |
|
|
|
◆ enableRetry:forHost:
+ (void) enableRetry: |
|
(BOOL) |
enabled |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ 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".
◆ NS_UNAVAILABLE
- (instancetype) NS_UNAVAILABLE |
|
|
|
◆ resetHostSettings
+ (void) resetHostSettings |
|
|
|
◆ setCallSafety:host:path:
+ (void) setCallSafety: |
|
(GRPCCallSafety) |
callSafety |
host: |
|
(NSString *) |
host |
path: |
|
(NSString *) |
path |
|
|
| |
The following methods are deprecated.
◆ setDefaultCompressMethod:forhost:
◆ setKeepaliveWithInterval:timeout:forHost:
+ (void) setKeepaliveWithInterval: |
|
(int) |
interval |
timeout: |
|
(int) |
timeout |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ setMinConnectTimeout:initialBackoff:maxBackoff:forHost:
+ (void) setMinConnectTimeout: |
|
(unsigned int) |
timeout |
initialBackoff: |
|
(unsigned int) |
initialBackoff |
maxBackoff: |
|
(unsigned int) |
maxBackoff |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ setResponseDispatchQueue:
- (void) setResponseDispatchQueue: |
|
(dispatch_queue_t) |
queue |
|
◆ setResponseSizeLimit:forHost:
+ (void) setResponseSizeLimit: |
|
(NSUInteger) |
limit |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ setTLSPEMRootCerts:forHost:error:
+ (BOOL) setTLSPEMRootCerts: |
|
(nullable NSString *) |
pemRootCert |
forHost: |
|
(nonnull NSString *) |
host |
error: |
|
(NSError *_Nullable *_Nullable) |
errorPtr |
|
|
| |
◆ 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 |
|
|
| |
◆ setUserAgentPrefix:forHost:
+ (void) setUserAgentPrefix: |
|
(nonnull NSString *) |
userAgentPrefix |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ setUserAgentSuffix:forHost:
+ (void) setUserAgentSuffix: |
|
(nonnull NSString *) |
userAgentSuffix |
forHost: |
|
(nonnull NSString *) |
host |
|
|
| |
◆ useInsecureConnectionsForHost:
+ (void) useInsecureConnectionsForHost: |
|
(NSString *) |
host |
|
◆ useTestCertsPath:testName:forHost:
+ (void) useTestCertsPath: |
|
(NSString *) |
certsPath |
testName: |
|
(NSString *) |
testName |
forHost: |
|
(NSString *) |
host |
|
|
| |
◆ oauth2AccessToken
- (NSString*) oauth2AccessToken |
|
readwriteatomiccopy |
◆ oauth2ChallengeHeader
- (NSString*) oauth2ChallengeHeader |
|
readatomiccopy |
◆ 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.
◆ 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.
◆ 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.
◆ serverName
◆ timeout
- (NSTimeInterval) timeout |
|
readwriteatomic |
◆ tokenProvider
The documentation for this class was generated from the following file: