Protocols
The following protocols are available globally.
-
Specifies a SocketEngine.
See moreDeclaration
Swift
@objc public protocol SocketEngineSpec
-
Declares that a type will be a delegate to an engine.
See moreDeclaration
Swift
@objc public protocol SocketEngineClient
-
Protocol that is used to implement socket.io polling support
See moreDeclaration
Swift
public protocol SocketEnginePollable : SocketEngineSpec
-
Protocol that is used to implement socket.io WebSocket support
See moreDeclaration
Swift
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate
-
A marking protocol that says a type can be represented in a socket.io packet.
Example:
See morestruct CustomData : SocketData { let name: String let age: Int func socketRepresentation() -> SocketData { return ["name": name, "age": age] } } socket.emit("myEvent", CustomData(name: "Erik", age: 24))
Declaration
Swift
public protocol SocketData
-
Represents a class will log client events.
See moreDeclaration
Swift
public protocol SocketLogger : class