ABSDKSplitNetworkTransport
public class ABSDKSplitNetworkTransport : NetworkTransport
A network transport that wraps a http transport and a websocket transport to cover query, mutation and subscription
-
Initialize a split transport with a http transport and a websocket transport
Declaration
Swift
public init(httpNetworkTransport: ABSDKHTTPNetworkTransport, webSocketNetworkTransport: ABSDKWebSocketTransport)
Parameters
httpNetworkTransport
The http network transport
websocketNetworkTransport
The websocket network transport
Return Value
The split network transport
-
Send an operation to server
Declaration
Swift
public func send<Operation>(operation: Operation, completionHandler: @escaping (GraphQLResponse<Operation>?, Error?) -> Void) -> Cancellable
Parameters
operation
The operation to send
completionHandler
An optional closure that is called when mutation results are available or when an error occurs.
Return Value
An object that can be used to cancel the operation.
-
Recover the connection status of the websocket transport
Declaration
Swift
public func reconnect()