Skip to content

Commit 1e29b20

Browse files
authored
Merge pull request #941 from Sproketti/documentation_fix
Fixes build warnings caused by documentation issues.
2 parents d853d85 + 8df1a12 commit 1e29b20

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

Source/SocketIO/Ack/SocketAckEmitter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public final class OnAckCallback : NSObject {
108108

109109
/// Completes an emitWithAck. If this isn't called, the emit never happens.
110110
///
111-
/// - parameter after: The number of seconds before this emit times out if an ack hasn't been received.
111+
/// - parameter seconds: The number of seconds before this emit times out if an ack hasn't been received.
112112
/// - parameter callback: The callback called when an ack is received, or when a timeout happens.
113113
/// To check for timeout, use `SocketAckStatus`'s `noAck` case.
114114
@objc

Source/SocketIO/Client/SocketIOClient.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
8686
/// Type safe way to create a new SocketIOClient. `opts` can be omitted.
8787
///
8888
/// - parameter manager: The manager for this socket.
89-
/// - parameter socketURL: The url of the socket.io server.
89+
/// - parameter nsp: The namespace of the socket.
9090
@objc
9191
public init(manager: SocketManagerSpec, nsp: String) {
9292
self.manager = manager
@@ -115,7 +115,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
115115
///
116116
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
117117
/// has failed. Pass 0 to never timeout.
118-
/// - parameter withHandler: The handler to call when the client fails to connect.
118+
/// - parameter handler: The handler to call when the client fails to connect.
119119
@objc
120120
open func connect(timeoutAfter: Double, withHandler handler: (() -> ())?) {
121121
assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)")
@@ -213,7 +213,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
213213
/// Same as emit, but meant for Objective-C
214214
///
215215
/// - parameter event: The event to send.
216-
/// - parameter with: The items to send with this event. Send an empty array to send no data.
216+
/// - parameter items: The items to send with this event. Send an empty array to send no data.
217217
@objc
218218
open func emit(_ event: String, with items: [Any]) {
219219
guard status == .connected else {
@@ -270,7 +270,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
270270
/// ```
271271
///
272272
/// - parameter event: The event to send.
273-
/// - parameter with: The items to send with this event. Use `[]` to send nothing.
273+
/// - parameter items: The items to send with this event. Use `[]` to send nothing.
274274
/// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.
275275
@objc
276276
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {
@@ -334,7 +334,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
334334
/// - parameter event: The name of the event.
335335
/// - parameter data: The data that was sent with this event.
336336
/// - parameter isInternalMessage: Whether this event was sent internally. If `true` it is always sent to handlers.
337-
/// - parameter withAck: If > 0 then this event expects to get an ack back from the client.
337+
/// - parameter ack: If > 0 then this event expects to get an ack back from the client.
338338
@objc
339339
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1) {
340340
guard status == .connected || isInternalMessage else { return }

Source/SocketIO/Client/SocketIOClientSpec.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public protocol SocketIOClientSpec : class {
5959
///
6060
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
6161
/// has failed. Pass 0 to never timeout.
62-
/// - parameter withHandler: The handler to call when the client fails to connect.
62+
/// - parameter handler: The handler to call when the client fails to connect.
6363
func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
6464

6565
/// Called when the client connects to a namespace. If the client was created with a namespace upfront,
@@ -134,7 +134,7 @@ public protocol SocketIOClientSpec : class {
134134
/// - parameter event: The name of the event.
135135
/// - parameter data: The data that was sent with this event.
136136
/// - parameter isInternalMessage: Whether this event was sent internally. If `true` it is always sent to handlers.
137-
/// - parameter withAck: If > 0 then this event expects to get an ack back from the client.
137+
/// - parameter ack: If > 0 then this event expects to get an ack back from the client.
138138
func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)
139139

140140
/// Causes a client to handle a socket.io packet. The namespace for the packet must match the namespace of the

Source/SocketIO/Engine/SocketEngine.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,6 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
461461
/// Parses a raw engine.io packet.
462462
///
463463
/// - parameter message: The message to parse.
464-
/// - parameter fromPolling: Whether this message is from long-polling.
465-
/// If `true` we might have to fix utf8 encoding.
466464
public func parseEngineMessage(_ message: String) {
467465
DefaultSocketLogger.Logger.log("Got message: \(message)", type: SocketEngine.logType)
468466

@@ -586,8 +584,8 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
586584
/// Writes a message to engine.io, independent of transport.
587585
///
588586
/// - parameter msg: The message to send.
589-
/// - parameter withType: The type of this message.
590-
/// - parameter withData: Any data that this message has.
587+
/// - parameter type: The type of this message.
588+
/// - parameter data: Any data that this message has.
591589
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) {
592590
engineQueue.async {
593591
guard self.connected else { return }

Source/SocketIO/Engine/SocketEngineSpec.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,13 @@ import Starscream
130130
/// Parses a raw engine.io packet.
131131
///
132132
/// - parameter message: The message to parse.
133-
/// - parameter fromPolling: Whether this message is from long-polling.
134-
/// If `true` we might have to fix utf8 encoding.
135133
func parseEngineMessage(_ message: String)
136134

137135
/// Writes a message to engine.io, independent of transport.
138136
///
139137
/// - parameter msg: The message to send.
140-
/// - parameter withType: The type of this message.
141-
/// - parameter withData: Any data that this message has.
138+
/// - parameter type: The type of this message.
139+
/// - parameter data: Any data that this message has.
142140
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
143141
}
144142

Source/SocketIO/Manager/SocketManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
241241
/// This will remove the socket for the manager's control, and make the socket instance useless and ready for
242242
/// releasing.
243243
///
244-
/// - parameter forNamespace: The namespace to disconnect from.
244+
/// - parameter nsp: The namespace to disconnect from.
245245
open func disconnectSocket(forNamespace nsp: String) {
246246
guard let socket = nsps.removeValue(forKey: nsp) else {
247247
DefaultSocketLogger.Logger.log("Could not find socket for \(nsp) to disconnect",
@@ -282,7 +282,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
282282
/// Same as `emitAll(_:_:)`, but meant for Objective-C.
283283
///
284284
/// - parameter event: The event to send.
285-
/// - parameter withItems: The data to send with this event.
285+
/// - parameter items: The data to send with this event.
286286
open func emitAll(_ event: String, withItems items: [Any]) {
287287
forAll {socket in
288288
socket.emit(event, with: items)
@@ -508,7 +508,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
508508
/// Call one of the `disconnectSocket` methods on this class to remove the socket from manager control.
509509
/// Or call `SocketIOClient.disconnect()` on the client.
510510
///
511-
/// - parameter forNamespace: The namespace for the socket.
511+
/// - parameter nsp: The namespace for the socket.
512512
/// - returns: A `SocketIOClient` for the given namespace.
513513
open func socket(forNamespace nsp: String) -> SocketIOClient {
514514
assert(nsp.hasPrefix("/"), "forNamespace must have a leading /")

Source/SocketIO/Manager/SocketManagerSpec.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ public protocol SocketManagerSpec : class, SocketEngineClient {
103103

104104
/// Disconnects the socket associated with `forNamespace`.
105105
///
106-
/// - parameter forNamespace: The namespace to disconnect from.
106+
/// - parameter nsp: The namespace to disconnect from.
107107
func disconnectSocket(forNamespace nsp: String)
108108

109109
/// Sends an event to the server on all namespaces in this manager.
110110
///
111111
/// - parameter event: The event to send.
112-
/// - parameter withItems: The data to send with this event.
112+
/// - parameter items: The data to send with this event.
113113
func emitAll(_ event: String, withItems items: [Any])
114114

115115
/// Tries to reconnect to the server.
@@ -133,7 +133,7 @@ public protocol SocketManagerSpec : class, SocketEngineClient {
133133
/// Call one of the `disconnectSocket` methods on the implementing class to remove the socket from manager control.
134134
/// Or call `SocketIOClient.disconnect()` on the client.
135135
///
136-
/// - parameter forNamespace: The namespace for the socket.
136+
/// - parameter nsp: The namespace for the socket.
137137
/// - returns: A `SocketIOClient` for the given namespace.
138138
func socket(forNamespace nsp: String) -> SocketIOClient
139139
}

0 commit comments

Comments
 (0)