Change Void to ()

This commit is contained in:
Erik 2017-05-28 15:30:39 -04:00
parent 30e4f59a16
commit 2e7183b8de
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
3 changed files with 6 additions and 6 deletions

View File

@ -120,7 +120,7 @@ extension SocketEnginePollable {
doLongPoll(for: req) doLongPoll(for: req)
} }
func doRequest(for req: URLRequest, callbackWith callback: @escaping (Data?, URLResponse?, Error?) -> Void) { func doRequest(for req: URLRequest, callbackWith callback: @escaping (Data?, URLResponse?, Error?) -> ()) {
guard polling && !closed && !invalidated && !fastUpgrade else { return } guard polling && !closed && !invalidated && !fastUpgrade else { return }
DefaultSocketLogger.Logger.log("Doing polling %@ %@", type: "SocketEnginePolling", DefaultSocketLogger.Logger.log("Doing polling %@ %@", type: "SocketEnginePolling",

View File

@ -89,7 +89,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
private let logType = "SocketIOClient" private let logType = "SocketIOClient"
private var anyHandler: ((SocketAnyEvent) -> Void)? private var anyHandler: ((SocketAnyEvent) -> ())?
private var currentReconnectAttempt = 0 private var currentReconnectAttempt = 0
private var handlers = [SocketEventHandler]() private var handlers = [SocketEventHandler]()
private var reconnecting = false private var reconnecting = false
@ -169,7 +169,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
/// - 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 withHandler: The handler to call when the client fails to connect. /// - parameter withHandler: The handler to call when the client fails to connect.
open func connect(timeoutAfter: Int, withHandler handler: (() -> Void)?) { open func connect(timeoutAfter: Int, withHandler handler: (() -> ())?) {
assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)") assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)")
guard status != .connected else { guard status != .connected else {
@ -524,7 +524,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
/// Adds a handler that will be called on every event. /// Adds a handler that will be called on every event.
/// ///
/// - parameter handler: The callback that will execute whenever an event is received. /// - parameter handler: The callback that will execute whenever an event is received.
open func onAny(_ handler: @escaping (SocketAnyEvent) -> Void) { open func onAny(_ handler: @escaping (SocketAnyEvent) -> ()) {
anyHandler = handler anyHandler = handler
} }

View File

@ -68,10 +68,10 @@ extension NSNull : SocketData { }
extension String : SocketData { } extension String : SocketData { }
/// A typealias for an ack callback. /// A typealias for an ack callback.
public typealias AckCallback = ([Any]) -> Void public typealias AckCallback = ([Any]) -> ()
/// A typealias for a normal callback. /// A typealias for a normal callback.
public typealias NormalCallback = ([Any], SocketAckEmitter) -> Void public typealias NormalCallback = ([Any], SocketAckEmitter) -> ()
typealias JSON = [String: Any] typealias JSON = [String: Any]
typealias Probe = (msg: String, type: SocketEnginePacketType, data: [Data]) typealias Probe = (msg: String, type: SocketEnginePacketType, data: [Data])