From 194642314ec93257263c4bf9572b092131f2050b Mon Sep 17 00:00:00 2001 From: Erik Little Date: Sat, 7 Nov 2020 18:57:29 -0500 Subject: [PATCH] update docs --- Source/SocketIO/Client/SocketIOClient.swift | 5 ++++- Source/SocketIO/Client/SocketIOClientSpec.swift | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/SocketIO/Client/SocketIOClient.swift b/Source/SocketIO/Client/SocketIOClient.swift index ca397fe..3047260 100644 --- a/Source/SocketIO/Client/SocketIOClient.swift +++ b/Source/SocketIO/Client/SocketIOClient.swift @@ -108,6 +108,8 @@ open class SocketIOClient: NSObject, SocketIOClientSpec { /// Connect to the server. The same as calling `connect(timeoutAfter:withHandler:)` with a timeout of 0. /// /// Only call after adding your event listeners, unless you know what you're doing. + /// + /// - parameter withPayload: An optional payload sent on connect open func connect(withPayload payload: [String: Any]? = nil) { connect(withPayload: payload, timeoutAfter: 0, withHandler: nil) } @@ -116,6 +118,7 @@ open class SocketIOClient: NSObject, SocketIOClientSpec { /// /// Only call after adding your event listeners, unless you know what you're doing. /// + /// - parameter withPayload: An optional payload sent on connect /// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection /// has failed. Pass 0 to never timeout. /// - parameter handler: The handler to call when the client fails to connect. @@ -343,7 +346,7 @@ open class SocketIOClient: NSObject, SocketIOClientSpec { /// Joins `nsp`. You shouldn't need to call this directly, instead call `connect`. /// - /// - Parameter payload: The optional + /// - parameter withPayload: An optional payload sent on connect open func joinNamespace(withPayload payload: [String: Any]? = nil) { DefaultSocketLogger.Logger.log("Joining namespace \(nsp)", type: logType) diff --git a/Source/SocketIO/Client/SocketIOClientSpec.swift b/Source/SocketIO/Client/SocketIOClientSpec.swift index 7813c53..9c0e550 100644 --- a/Source/SocketIO/Client/SocketIOClientSpec.swift +++ b/Source/SocketIO/Client/SocketIOClientSpec.swift @@ -73,7 +73,7 @@ public protocol SocketIOClientSpec : AnyObject { /// /// Only call after adding your event listeners, unless you know what you're doing. /// - /// - parameter payload: An optional payload sent on connect + /// - parameter withPayload: An optional payload sent on connect /// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection /// has failed. Pass 0 to never timeout. /// - parameter handler: The handler to call when the client fails to connect. @@ -164,7 +164,7 @@ public protocol SocketIOClientSpec : AnyObject { /// Call when you wish to leave a namespace and disconnect this socket. func leaveNamespace() - /// Joins `nsp`. + /// Joins `nsp`. You shouldn't need to call this directly, instead call `connect`. /// /// - Parameter withPayload: The payload to connect when joining this namespace func joinNamespace(withPayload payload: [String: Any]?)