Skip to content

Commit 1946423

Browse files
committed
update docs
1 parent d7d8903 commit 1946423

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Source/SocketIO/Client/SocketIOClient.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ open class SocketIOClient: NSObject, SocketIOClientSpec {
108108
/// Connect to the server. The same as calling `connect(timeoutAfter:withHandler:)` with a timeout of 0.
109109
///
110110
/// Only call after adding your event listeners, unless you know what you're doing.
111+
///
112+
/// - parameter withPayload: An optional payload sent on connect
111113
open func connect(withPayload payload: [String: Any]? = nil) {
112114
connect(withPayload: payload, timeoutAfter: 0, withHandler: nil)
113115
}
@@ -116,6 +118,7 @@ open class SocketIOClient: NSObject, SocketIOClientSpec {
116118
///
117119
/// Only call after adding your event listeners, unless you know what you're doing.
118120
///
121+
/// - parameter withPayload: An optional payload sent on connect
119122
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
120123
/// has failed. Pass 0 to never timeout.
121124
/// - parameter handler: The handler to call when the client fails to connect.
@@ -343,7 +346,7 @@ open class SocketIOClient: NSObject, SocketIOClientSpec {
343346

344347
/// Joins `nsp`. You shouldn't need to call this directly, instead call `connect`.
345348
///
346-
/// - Parameter payload: The optional
349+
/// - parameter withPayload: An optional payload sent on connect
347350
open func joinNamespace(withPayload payload: [String: Any]? = nil) {
348351
DefaultSocketLogger.Logger.log("Joining namespace \(nsp)", type: logType)
349352

Source/SocketIO/Client/SocketIOClientSpec.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public protocol SocketIOClientSpec : AnyObject {
7373
///
7474
/// Only call after adding your event listeners, unless you know what you're doing.
7575
///
76-
/// - parameter payload: An optional payload sent on connect
76+
/// - parameter withPayload: An optional payload sent on connect
7777
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
7878
/// has failed. Pass 0 to never timeout.
7979
/// - parameter handler: The handler to call when the client fails to connect.
@@ -164,7 +164,7 @@ public protocol SocketIOClientSpec : AnyObject {
164164
/// Call when you wish to leave a namespace and disconnect this socket.
165165
func leaveNamespace()
166166

167-
/// Joins `nsp`.
167+
/// Joins `nsp`. You shouldn't need to call this directly, instead call `connect`.
168168
///
169169
/// - Parameter withPayload: The payload to connect when joining this namespace
170170
func joinNamespace(withPayload payload: [String: Any]?)

0 commit comments

Comments
 (0)