Skip to content

Commit 6db5348

Browse files
committed
use AnyObject over class in protocols
1 parent 9bf0731 commit 6db5348

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Source/SocketIO/Client/SocketIOClientSpec.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Dispatch
2626
import Foundation
2727

2828
/// Defines the interface for a SocketIOClient.
29-
public protocol SocketIOClientSpec : class {
29+
public protocol SocketIOClientSpec : AnyObject {
3030
// MARK: Properties
3131

3232
/// A handler that will be called on any event.

Source/SocketIO/Manager/SocketManagerSpec.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import Foundation
4646
/// or call one of the `disconnectSocket` methods on this class.
4747
///
4848
@objc
49-
public protocol SocketManagerSpec : class, SocketEngineClient {
49+
public protocol SocketManagerSpec : AnyObject, SocketEngineClient {
5050
// MARK: Properties
5151

5252
/// Returns the socket associated with the default namespace ("/").

Source/SocketIO/Parse/SocketParsable.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import Foundation
2424

2525
/// Defines that a type will be able to parse socket.io-protocol messages.
26-
public protocol SocketParsable : class {
26+
public protocol SocketParsable : AnyObject {
2727
// MARK: Methods
2828

2929
/// Called when the engine has received some binary data that should be attached to a packet.
@@ -57,7 +57,7 @@ public enum SocketParsableError : Error {
5757
}
5858

5959
/// Says that a type will be able to buffer binary data before all data for an event has come in.
60-
public protocol SocketDataBufferable : class {
60+
public protocol SocketDataBufferable : AnyObject {
6161
// MARK: Properties
6262

6363
/// A list of packets that are waiting for binary data.

Source/SocketIO/Util/SocketLogger.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import Foundation
2626

2727
/// Represents a class will log client events.
28-
public protocol SocketLogger : class {
28+
public protocol SocketLogger : AnyObject {
2929
// MARK: Properties
3030

3131
/// Whether to log or not

0 commit comments

Comments
 (0)