You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ack with:@[@"Got your currentAmount, ", @"dude"]];
46
47
}];
@@ -182,8 +183,8 @@ Methods
182
183
3.`onAny(callback:((event: String, items: AnyObject?)) -> Void)` - Adds a handler for all events. It will be called on any received event.
183
184
4.`emit(_ event: String, _ items: AnyObject...)` - Sends a message. Can send multiple items.
184
185
5.`emit(_ event: String, withItems items: [AnyObject])` - `emit` for Objective-C
185
-
6.`emitWithAck(_ event: String, _ items: AnyObject...) -> (timeoutAfter: UInt64, callback: (NSArray?) -> Void) -> Void` - Sends a message that requests an acknowledgement from the server. Returns a function which you can use to add a handler. See example. Note: The message is not sent until you call the returned function.
186
-
7.`emitWithAck(_ event: String, withItems items: [AnyObject]) -> (UInt64, (NSArray?) -> Void) -> Void` - `emitWithAck` for Objective-C. Note: The message is not sent until you call the returned function.
186
+
6.`emitWithAck(_ event: String, _ items: AnyObject...) -> OnAckCallback` - Sends a message that requests an acknowledgement from the server. Returns an object which you can use to add a handler. See example. Note: The message is not sent until you call timingOut(after:) on the returned object.
187
+
7.`emitWithAck(_ event: String, withItems items: [AnyObject]) -> OnAckCallback` - `emitWithAck` for Objective-C. Note: The message is not sent until you call timingOutAfter on the returned object.
187
188
8.`connect()` - Establishes a connection to the server. A "connect" event is fired upon successful connection.
188
189
9.`connect(timeoutAfter timeoutAfter: Int, withTimeoutHandler handler: (() -> Void)?)` - Connect to the server. If it isn't connected after timeoutAfter seconds, the handler is called.
189
190
10.`disconnect()` - Closes the socket. Reopening a disconnected socket is not fully tested.
0 commit comments