update docs

This commit is contained in:
Erik Little 2020-11-07 18:57:29 -05:00
parent d7d8903fee
commit 194642314e
No known key found for this signature in database
GPG Key ID: 62F837E56F4E9320
2 changed files with 6 additions and 3 deletions

View File

@ -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. /// 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. /// 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) { open func connect(withPayload payload: [String: Any]? = nil) {
connect(withPayload: payload, timeoutAfter: 0, withHandler: 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. /// 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 /// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
/// has failed. Pass 0 to never timeout. /// has failed. Pass 0 to never timeout.
/// - parameter handler: The handler to call when the client fails to connect. /// - 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`. /// 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) { open func joinNamespace(withPayload payload: [String: Any]? = nil) {
DefaultSocketLogger.Logger.log("Joining namespace \(nsp)", type: logType) DefaultSocketLogger.Logger.log("Joining namespace \(nsp)", type: logType)

View File

@ -73,7 +73,7 @@ public protocol SocketIOClientSpec : AnyObject {
/// ///
/// Only call after adding your event listeners, unless you know what you're doing. /// 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 /// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
/// has failed. Pass 0 to never timeout. /// has failed. Pass 0 to never timeout.
/// - parameter handler: The handler to call when the client fails to connect. /// - 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. /// Call when you wish to leave a namespace and disconnect this socket.
func leaveNamespace() 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 /// - Parameter withPayload: The payload to connect when joining this namespace
func joinNamespace(withPayload payload: [String: Any]?) func joinNamespace(withPayload payload: [String: Any]?)