RLMNetworkTransport
Objective-C
@protocol RLMNetworkTransport <NSObject>
Swift
protocol RLMNetworkTransportProtocol : NSObjectProtocol, Sendable
Transporting protocol for foreign interfaces. Allows for custom request/response handling.
-
Sends a request to a given endpoint.
Declaration
Objective-C
- (void)sendRequestToServer:(nonnull RLMRequest *)request completion:(nonnull RLMNetworkTransportCompletionBlock) completionBlock;Swift
func sendRequest(toServer request: RLMRequest) async -> RLMResponseParameters
requestThe request to send.
completionBlockA callback invoked on completion of the request.
-
Starts an event stream request.
Declaration
Objective-C
- (nonnull NSURLSession *)doStreamRequest:(nonnull RLMRequest *)request eventSubscriber: (nonnull id<RLMEventDelegate>)subscriber;Swift
func doStreamRequest(_ request: RLMRequest, eventSubscriber subscriber: any RLMEventDelegate) -> URLSessionParameters
requestThe RLMRequest to start.
subscriberThe RLMEventDelegate which will subscribe to changes from the server.
View on GitHub
Install in Dash