Skip to content

Commit d7d1da7

Browse files
committed
document connect method
1 parent 5a5dc70 commit d7d1da7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,9 @@ Methods
109109
5. `emitWithAck(event:String, _ items:AnyObject...) -> (timeout: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.
110110
6. `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.
111111
7. `connect()` - Establishes a connection to the server. A "connect" event is fired upon successful connection.
112-
8. `close(#fast:Bool)` - Closes the socket. Once a socket is closed it should not be reopened. Pass true to fast if you're closing from a background task.
113-
9. `reconnect()` - Causes the client to reconnect to the server.
112+
8. `connect(#timeoutAfter:Int, withTimeoutHandler handler:(() -> Void)?)` - Connect to the server. If it isn't connect after timeoutAfter seconds, the handler is called.
113+
9. `close(#fast:Bool)` - Closes the socket. Once a socket is closed it should not be reopened. Pass true to fast if you're closing from a background task.
114+
10. `reconnect()` - Causes the client to reconnect to the server.
114115

115116
Client Events
116117
------

0 commit comments

Comments
 (0)