From 943e94ed0e497d83f4e6305986a64da149be0367 Mon Sep 17 00:00:00 2001 From: Erik Little Date: Tue, 14 Nov 2017 08:18:07 -0500 Subject: [PATCH] Fix some documentation marks --- Source/SocketIO/Ack/SocketAckManager.swift | 2 ++ Source/SocketIO/Client/SocketIOClientConfiguration.swift | 2 ++ Source/SocketIO/Engine/SocketEnginePollable.swift | 4 +++- Source/SocketIO/Engine/SocketEngineSpec.swift | 6 ++++++ Source/SocketIO/Engine/SocketEngineWebsocket.swift | 2 ++ Source/SocketIO/Parse/SocketParsable.swift | 4 ++-- Source/SocketIO/Util/SSLSecurity.swift | 4 ++++ 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Source/SocketIO/Ack/SocketAckManager.swift b/Source/SocketIO/Ack/SocketAckManager.swift index 67b50aa..cda3271 100644 --- a/Source/SocketIO/Ack/SocketAckManager.swift +++ b/Source/SocketIO/Ack/SocketAckManager.swift @@ -27,6 +27,8 @@ import Foundation /// The status of an ack. public enum SocketAckStatus : String { + // MARK: Cases + /// The ack timed out. case noAck = "NO ACK" } diff --git a/Source/SocketIO/Client/SocketIOClientConfiguration.swift b/Source/SocketIO/Client/SocketIOClientConfiguration.swift index 97f6d91..0ccaace 100644 --- a/Source/SocketIO/Client/SocketIOClientConfiguration.swift +++ b/Source/SocketIO/Client/SocketIOClientConfiguration.swift @@ -129,6 +129,8 @@ public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collectio /// Declares that a type can set configs from a `SocketIOClientConfiguration`. public protocol ConfigSettable { + // MARK: Methods + /// Called when an `ConfigSettable` should set/update its configs from a given configuration. /// /// - parameter config: The `SocketIOClientConfiguration` that should be used to set/update configs. diff --git a/Source/SocketIO/Engine/SocketEnginePollable.swift b/Source/SocketIO/Engine/SocketEnginePollable.swift index 680f9cf..c1c4f6f 100644 --- a/Source/SocketIO/Engine/SocketEnginePollable.swift +++ b/Source/SocketIO/Engine/SocketEnginePollable.swift @@ -26,7 +26,7 @@ import Foundation /// Protocol that is used to implement socket.io polling support public protocol SocketEnginePollable : SocketEngineSpec { - /// MARK: Properties + // MARK: Properties /// `true` If engine's session has been invalidated. var invalidated: Bool { get } @@ -51,6 +51,8 @@ public protocol SocketEnginePollable : SocketEngineSpec { /// **Do not touch this directly** var waitingForPost: Bool { get set } + // MARK: Methods + /// Call to send a long-polling request. /// /// You shouldn't need to call this directly, the engine should automatically maintain a long-poll request. diff --git a/Source/SocketIO/Engine/SocketEngineSpec.swift b/Source/SocketIO/Engine/SocketEngineSpec.swift index 76db405..b6ebef1 100644 --- a/Source/SocketIO/Engine/SocketEngineSpec.swift +++ b/Source/SocketIO/Engine/SocketEngineSpec.swift @@ -28,6 +28,8 @@ import Starscream /// Specifies a SocketEngine. @objc public protocol SocketEngineSpec { + // MARK: Properties + /// The client for this engine. var client: SocketEngineClient? { get set } @@ -85,6 +87,8 @@ import Starscream /// The WebSocket for this engine. var ws: WebSocket? { get } + // MARK: Initializers + /// Creates a new engine. /// /// - parameter client: The client for this engine. @@ -92,6 +96,8 @@ import Starscream /// - parameter options: The options for this engine. init(client: SocketEngineClient, url: URL, options: [String: Any]?) + // MARK: Methods + /// Starts the connection to the server. func connect() diff --git a/Source/SocketIO/Engine/SocketEngineWebsocket.swift b/Source/SocketIO/Engine/SocketEngineWebsocket.swift index 75da709..97a4a72 100644 --- a/Source/SocketIO/Engine/SocketEngineWebsocket.swift +++ b/Source/SocketIO/Engine/SocketEngineWebsocket.swift @@ -28,6 +28,8 @@ import Starscream /// Protocol that is used to implement socket.io WebSocket support public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate { + // MARK: Methods + /// Sends an engine.io message through the WebSocket transport. /// /// You shouldn't call this directly, instead call the `write` method on `SocketEngine`. diff --git a/Source/SocketIO/Parse/SocketParsable.swift b/Source/SocketIO/Parse/SocketParsable.swift index 2349ce3..b0a9e30 100644 --- a/Source/SocketIO/Parse/SocketParsable.swift +++ b/Source/SocketIO/Parse/SocketParsable.swift @@ -24,8 +24,6 @@ import Foundation /// Defines that a type will be able to parse socket.io-protocol messages. public protocol SocketParsable : class { - // MARK: Properties - // MARK: Methods /// Called when the engine has received some binary data that should be attached to a packet. @@ -60,6 +58,8 @@ public enum SocketParsableError : Error { /// Says that a type will be able to buffer binary data before all data for an event has come in. public protocol SocketDataBufferable : class { + // MARK: Properties + /// A list of packets that are waiting for binary data. /// /// The way that socket.io works all data should be sent directly after each packet. diff --git a/Source/SocketIO/Util/SSLSecurity.swift b/Source/SocketIO/Util/SSLSecurity.swift index f621782..2035265 100644 --- a/Source/SocketIO/Util/SSLSecurity.swift +++ b/Source/SocketIO/Util/SSLSecurity.swift @@ -27,6 +27,8 @@ import Starscream /// A wrapper around Starscream's SSLSecurity that provides a minimal Objective-C interface. open class SSLSecurity : NSObject { + // MARK: Properties + /// The internal Starscream SSLSecurity. public let security: Starscream.SSLSecurity @@ -34,6 +36,8 @@ open class SSLSecurity : NSObject { self.security = security } + // MARK: Methods + /// Creates a new SSLSecurity that specifies whether to use publicKeys or certificates should be used for SSL /// pinning validation ///