File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
FearlessUtils/Classes/Network Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ public final class JSONRPCSubscription<T: Decodable>: JSONRPCSubscribing {
95
95
}
96
96
97
97
public protocol JSONRPCEngine : AnyObject {
98
+ var url : URL ? { get set }
98
99
var pendingEngineRequests : [ JSONRPCRequest ] { get }
99
100
100
101
func callMethod< P: Encodable , T: Decodable > (
@@ -116,8 +117,10 @@ public protocol JSONRPCEngine: AnyObject {
116
117
117
118
func generateRequestId( ) -> UInt16
118
119
func addSubscription( _ subscription: JSONRPCSubscribing )
119
- func connect( with pendingRequests: [ JSONRPCRequest ] )
120
120
func reconnect( url: URL )
121
+
122
+ func connectIfNeeded( )
123
+ func disconnectIfNeeded( )
121
124
}
122
125
123
126
public extension JSONRPCEngine {
Original file line number Diff line number Diff line change @@ -74,12 +74,6 @@ extension WebSocketEngine: JSONRPCEngine {
74
74
mutex. unlock ( )
75
75
}
76
76
77
- public func connect( with pendingRequests: [ JSONRPCRequest ] ) {
78
- pendingRequests. forEach {
79
- updateConnectionForRequest ( $0)
80
- }
81
- }
82
-
83
77
public func reconnect( url: URL ) {
84
78
self . connection. delegate = nil
85
79
You can’t perform that action at this time.
0 commit comments