Merge branch 'documentation' into development
* documentation: Document SocketIOClientSwift
This commit is contained in:
commit
cc3d7f8b07
2
.gitignore
vendored
2
.gitignore
vendored
@ -48,3 +48,5 @@ DerivedData
|
|||||||
Socket.IO-Test-Server/node_modules/*
|
Socket.IO-Test-Server/node_modules/*
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
docs/docsets/
|
||||||
|
docs/undocumented.json
|
||||||
|
|||||||
@ -32,6 +32,8 @@ public final class SocketAckEmitter : NSObject {
|
|||||||
let socket: SocketIOClient
|
let socket: SocketIOClient
|
||||||
let ackNum: Int
|
let ackNum: Int
|
||||||
|
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
/// If true, this handler is expecting to be acked. Call `with(_: SocketData...)` to ack.
|
/// If true, this handler is expecting to be acked. Call `with(_: SocketData...)` to ack.
|
||||||
public var expected: Bool {
|
public var expected: Bool {
|
||||||
return ackNum != -1
|
return ackNum != -1
|
||||||
@ -67,6 +69,7 @@ public final class SocketAckEmitter : NSObject {
|
|||||||
/// A class that represents an emit that will request an ack that has not yet been sent.
|
/// A class that represents an emit that will request an ack that has not yet been sent.
|
||||||
/// Call `timingOut(after:callback:)` to complete the emit
|
/// Call `timingOut(after:callback:)` to complete the emit
|
||||||
/// Example:
|
/// Example:
|
||||||
|
///
|
||||||
/// ```swift
|
/// ```swift
|
||||||
/// socket.emitWithAck("myEvent").timingOut(after: 1) {data in
|
/// socket.emitWithAck("myEvent").timingOut(after: 1) {data in
|
||||||
/// ...
|
/// ...
|
||||||
|
|||||||
@ -26,14 +26,14 @@ import Foundation
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Experimental socket manager.
|
Experimental socket manager.
|
||||||
|
|
||||||
API subject to change.
|
API subject to change.
|
||||||
|
|
||||||
Can be used to persist sockets across ViewControllers.
|
Can be used to persist sockets across ViewControllers.
|
||||||
|
|
||||||
Sockets are strongly stored, so be sure to remove them once they are no
|
Sockets are strongly stored, so be sure to remove them once they are no
|
||||||
longer needed.
|
longer needed.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
```
|
```
|
||||||
let manager = SocketClientManager.sharedManager
|
let manager = SocketClientManager.sharedManager
|
||||||
@ -44,38 +44,59 @@ import Foundation
|
|||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
open class SocketClientManager : NSObject {
|
open class SocketClientManager : NSObject {
|
||||||
|
// MARK: Properties.
|
||||||
|
|
||||||
|
/// The shared manager.
|
||||||
open static let sharedManager = SocketClientManager()
|
open static let sharedManager = SocketClientManager()
|
||||||
|
|
||||||
private var sockets = [String: SocketIOClient]()
|
private var sockets = [String: SocketIOClient]()
|
||||||
|
|
||||||
|
/// Gets a socket by its name.
|
||||||
|
///
|
||||||
|
/// - returns: The socket, if one had the given name.
|
||||||
open subscript(string: String) -> SocketIOClient? {
|
open subscript(string: String) -> SocketIOClient? {
|
||||||
get {
|
get {
|
||||||
return sockets[string]
|
return sockets[string]
|
||||||
}
|
}
|
||||||
|
|
||||||
set(socket) {
|
set(socket) {
|
||||||
sockets[string] = socket
|
sockets[string] = socket
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Methods.
|
||||||
|
|
||||||
|
/// Adds a socket.
|
||||||
|
///
|
||||||
|
/// - parameter socket: The socket to add.
|
||||||
|
/// - parameter labeledAs: The label for this socket.
|
||||||
open func addSocket(_ socket: SocketIOClient, labeledAs label: String) {
|
open func addSocket(_ socket: SocketIOClient, labeledAs label: String) {
|
||||||
sockets[label] = socket
|
sockets[label] = socket
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Removes a socket by a given name.
|
||||||
|
///
|
||||||
|
/// - parameter withLabel: The label of the socket to remove.
|
||||||
|
/// - returns: The socket for the given label, if one was present.
|
||||||
open func removeSocket(withLabel label: String) -> SocketIOClient? {
|
open func removeSocket(withLabel label: String) -> SocketIOClient? {
|
||||||
return sockets.removeValue(forKey: label)
|
return sockets.removeValue(forKey: label)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Removes a socket.
|
||||||
|
///
|
||||||
|
/// - parameter socket: The socket to remove.
|
||||||
|
/// - returns: The socket if it was in the manager.
|
||||||
open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient? {
|
open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient? {
|
||||||
var returnSocket: SocketIOClient?
|
var returnSocket: SocketIOClient?
|
||||||
|
|
||||||
for (label, dictSocket) in sockets where dictSocket === socket {
|
for (label, dictSocket) in sockets where dictSocket === socket {
|
||||||
returnSocket = sockets.removeValue(forKey: label)
|
returnSocket = sockets.removeValue(forKey: label)
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnSocket
|
return returnSocket
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Removes all the sockets in the manager.
|
||||||
open func removeSockets() {
|
open func removeSockets() {
|
||||||
sockets.removeAll()
|
sockets.removeAll()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,38 +25,96 @@
|
|||||||
import Dispatch
|
import Dispatch
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// The class that handles the engine.io protocol and transports.
|
||||||
|
/// See `SocketEnginePollable` and `SocketEngineWebsocket` for transport specific methods.
|
||||||
public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket {
|
public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket {
|
||||||
public let engineQueue = DispatchQueue(label: "com.socketio.engineHandleQueue", attributes: [])
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// The queue that all engine actions take place on.
|
||||||
|
public let engineQueue = DispatchQueue(label: "com.socketio.engineHandleQueue")
|
||||||
|
|
||||||
|
/// The connect parameters sent during a connect.
|
||||||
public var connectParams: [String: Any]? {
|
public var connectParams: [String: Any]? {
|
||||||
didSet {
|
didSet {
|
||||||
(urlPolling, urlWebSocket) = createURLs()
|
(urlPolling, urlWebSocket) = createURLs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A queue of engine.io messages waiting for POSTing
|
||||||
|
///
|
||||||
|
/// **You should not touch this directly**
|
||||||
public var postWait = [String]()
|
public var postWait = [String]()
|
||||||
|
|
||||||
|
/// `true` if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to
|
||||||
|
/// disconnect us.
|
||||||
|
///
|
||||||
|
/// **Do not touch this directly**
|
||||||
public var waitingForPoll = false
|
public var waitingForPoll = false
|
||||||
|
|
||||||
|
/// `true` if there is an outstanding post. Trying to post before the first is done will cause socket.io to
|
||||||
|
/// disconnect us.
|
||||||
|
///
|
||||||
|
/// **Do not touch this directly**
|
||||||
public var waitingForPost = false
|
public var waitingForPost = false
|
||||||
|
|
||||||
|
/// `true` if this engine is closed.
|
||||||
public private(set) var closed = false
|
public private(set) var closed = false
|
||||||
|
|
||||||
|
/// `true` if this engine is connected. Connected means that the initial poll connect has succeeded.
|
||||||
public private(set) var connected = false
|
public private(set) var connected = false
|
||||||
|
|
||||||
|
/// An array of HTTPCookies that are sent during the connection.
|
||||||
public private(set) var cookies: [HTTPCookie]?
|
public private(set) var cookies: [HTTPCookie]?
|
||||||
|
|
||||||
|
/// Set to `true` if using the node.js version of socket.io. The node.js version of socket.io
|
||||||
|
/// handles utf8 incorrectly.
|
||||||
public private(set) var doubleEncodeUTF8 = true
|
public private(set) var doubleEncodeUTF8 = true
|
||||||
|
|
||||||
|
/// A dictionary of extra http headers that will be set during connection.
|
||||||
public private(set) var extraHeaders: [String: String]?
|
public private(set) var extraHeaders: [String: String]?
|
||||||
|
|
||||||
|
/// When `true`, the engine is in the process of switching to WebSockets.
|
||||||
|
///
|
||||||
|
/// **Do not touch this directly**
|
||||||
public private(set) var fastUpgrade = false
|
public private(set) var fastUpgrade = false
|
||||||
|
|
||||||
|
/// When `true`, the engine will only use HTTP long-polling as a transport.
|
||||||
public private(set) var forcePolling = false
|
public private(set) var forcePolling = false
|
||||||
|
|
||||||
|
/// When `true`, the engine will only use WebSockets as a transport.
|
||||||
public private(set) var forceWebsockets = false
|
public private(set) var forceWebsockets = false
|
||||||
|
|
||||||
|
/// `true` If engine's session has been invalidated.
|
||||||
public private(set) var invalidated = false
|
public private(set) var invalidated = false
|
||||||
|
|
||||||
|
/// If `true`, the engine is currently in HTTP long-polling mode.
|
||||||
public private(set) var polling = true
|
public private(set) var polling = true
|
||||||
|
|
||||||
|
/// If `true`, the engine is currently seeing whether it can upgrade to WebSockets.
|
||||||
public private(set) var probing = false
|
public private(set) var probing = false
|
||||||
|
|
||||||
|
/// The URLSession that will be used for polling.
|
||||||
public private(set) var session: URLSession?
|
public private(set) var session: URLSession?
|
||||||
|
|
||||||
|
/// The session id for this engine.
|
||||||
public private(set) var sid = ""
|
public private(set) var sid = ""
|
||||||
|
|
||||||
|
/// The path to engine.io.
|
||||||
public private(set) var socketPath = "/engine.io/"
|
public private(set) var socketPath = "/engine.io/"
|
||||||
|
|
||||||
|
/// The url for polling.
|
||||||
public private(set) var urlPolling = URL(string: "http://localhost/")!
|
public private(set) var urlPolling = URL(string: "http://localhost/")!
|
||||||
|
|
||||||
|
/// The url for WebSockets.
|
||||||
public private(set) var urlWebSocket = URL(string: "http://localhost/")!
|
public private(set) var urlWebSocket = URL(string: "http://localhost/")!
|
||||||
|
|
||||||
|
/// If `true`, then the engine is currently in WebSockets mode.
|
||||||
public private(set) var websocket = false
|
public private(set) var websocket = false
|
||||||
|
|
||||||
|
/// The WebSocket for this engine.
|
||||||
public private(set) var ws: WebSocket?
|
public private(set) var ws: WebSocket?
|
||||||
|
|
||||||
|
/// The client for this engine.
|
||||||
public weak var client: SocketEngineClient?
|
public weak var client: SocketEngineClient?
|
||||||
|
|
||||||
private weak var sessionDelegate: URLSessionDelegate?
|
private weak var sessionDelegate: URLSessionDelegate?
|
||||||
@ -79,6 +137,13 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
private var selfSigned = false
|
private var selfSigned = false
|
||||||
private var voipEnabled = false
|
private var voipEnabled = false
|
||||||
|
|
||||||
|
// MARK: Initializers
|
||||||
|
|
||||||
|
/// Creates a new engine.
|
||||||
|
///
|
||||||
|
/// - parameter client: The client for this engine.
|
||||||
|
/// - parameter url: The url for this engine.
|
||||||
|
/// - parameter config: An array of configuration options for this engine.
|
||||||
public init(client: SocketEngineClient, url: URL, config: SocketIOClientConfiguration) {
|
public init(client: SocketEngineClient, url: URL, config: SocketIOClientConfiguration) {
|
||||||
self.client = client
|
self.client = client
|
||||||
self.url = url
|
self.url = url
|
||||||
@ -124,6 +189,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
(urlPolling, urlWebSocket) = createURLs()
|
(urlPolling, urlWebSocket) = createURLs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates a new engine.
|
||||||
|
///
|
||||||
|
/// - parameter client: The client for this engine.
|
||||||
|
/// - parameter url: The url for this engine.
|
||||||
|
/// - parameter options: The options for this engine.
|
||||||
public convenience init(client: SocketEngineClient, url: URL, options: NSDictionary?) {
|
public convenience init(client: SocketEngineClient, url: URL, options: NSDictionary?) {
|
||||||
self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])
|
self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])
|
||||||
}
|
}
|
||||||
@ -134,6 +204,8 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
stopPolling()
|
stopPolling()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Methods
|
||||||
|
|
||||||
private func checkAndHandleEngineError(_ msg: String) {
|
private func checkAndHandleEngineError(_ msg: String) {
|
||||||
do {
|
do {
|
||||||
let dict = try msg.toNSDictionary()
|
let dict = try msg.toNSDictionary()
|
||||||
@ -171,7 +243,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
client?.engineDidClose(reason: reason)
|
client?.engineDidClose(reason: reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Starts the connection to the server
|
/// Starts the connection to the server.
|
||||||
public func connect() {
|
public func connect() {
|
||||||
engineQueue.async {
|
engineQueue.async {
|
||||||
self._connect()
|
self._connect()
|
||||||
@ -273,12 +345,16 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
ws?.connect()
|
ws?.connect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when an error happens during execution. Causes a disconnection.
|
||||||
public func didError(reason: String) {
|
public func didError(reason: String) {
|
||||||
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
||||||
client?.engineDidError(reason: reason)
|
client?.engineDidError(reason: reason)
|
||||||
disconnect(reason: reason)
|
disconnect(reason: reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Disconnects from the server.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason for the disconnection. This is communicated up to the client.
|
||||||
public func disconnect(reason: String) {
|
public func disconnect(reason: String) {
|
||||||
engineQueue.async {
|
engineQueue.async {
|
||||||
self._disconnect(reason: reason)
|
self._disconnect(reason: reason)
|
||||||
@ -311,6 +387,10 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
closeOutEngine(reason: reason)
|
closeOutEngine(reason: reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called to switch from HTTP long-polling to WebSockets. After calling this method the engine will be in
|
||||||
|
/// WebSocket mode.
|
||||||
|
///
|
||||||
|
/// **You shouldn't call this directly**
|
||||||
public func doFastUpgrade() {
|
public func doFastUpgrade() {
|
||||||
if waitingForPoll {
|
if waitingForPoll {
|
||||||
DefaultSocketLogger.Logger.error("Outstanding poll when switched to WebSockets," +
|
DefaultSocketLogger.Logger.error("Outstanding poll when switched to WebSockets," +
|
||||||
@ -339,8 +419,10 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We had packets waiting for send when we upgraded
|
/// Causes any packets that were waiting for POSTing to be sent through the WebSocket. This happens because when
|
||||||
// Send them raw
|
/// the engine is attempting to upgrade to WebSocket it does not do any POSTing.
|
||||||
|
///
|
||||||
|
/// **You shouldn't call this directly**
|
||||||
public func flushWaitingForPostToWebSocket() {
|
public func flushWaitingForPostToWebSocket() {
|
||||||
guard let ws = self.ws else { return }
|
guard let ws = self.ws else { return }
|
||||||
|
|
||||||
@ -415,12 +497,20 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parses raw binary received from engine.io.
|
||||||
|
///
|
||||||
|
/// - parameter data: The data to parse.
|
||||||
public func parseEngineData(_ data: Data) {
|
public func parseEngineData(_ data: Data) {
|
||||||
DefaultSocketLogger.Logger.log("Got binary data: %@", type: "SocketEngine", args: data)
|
DefaultSocketLogger.Logger.log("Got binary data: %@", type: "SocketEngine", args: data)
|
||||||
|
|
||||||
client?.parseEngineBinaryData(data.subdata(in: 1..<data.endIndex))
|
client?.parseEngineBinaryData(data.subdata(in: 1..<data.endIndex))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parses a raw engine.io packet.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to parse.
|
||||||
|
/// - parameter fromPolling: Whether this message is from long-polling.
|
||||||
|
/// If `true` we might have to fix utf8 encoding.
|
||||||
public func parseEngineMessage(_ message: String, fromPolling: Bool) {
|
public func parseEngineMessage(_ message: String, fromPolling: Bool) {
|
||||||
DefaultSocketLogger.Logger.log("Got message: %@", type: logType, args: message)
|
DefaultSocketLogger.Logger.log("Got message: %@", type: logType, args: message)
|
||||||
|
|
||||||
@ -506,7 +596,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Write a message, independent of transport.
|
/// Writes a message to engine.io, independent of transport.
|
||||||
|
///
|
||||||
|
/// - parameter msg: The message to send.
|
||||||
|
/// - parameter withType: The type of this message.
|
||||||
|
/// - parameter withData: Any data that this message has.
|
||||||
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) {
|
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) {
|
||||||
engineQueue.async {
|
engineQueue.async {
|
||||||
guard self.connected else { return }
|
guard self.connected else { return }
|
||||||
@ -525,7 +619,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delegate methods
|
// MARK: Starscream delegate conformance
|
||||||
|
|
||||||
|
/// Delegate method for connection.
|
||||||
public func websocketDidConnect(socket: WebSocket) {
|
public func websocketDidConnect(socket: WebSocket) {
|
||||||
if !forceWebsockets {
|
if !forceWebsockets {
|
||||||
probing = true
|
probing = true
|
||||||
@ -537,6 +633,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Delegate method for disconnection.
|
||||||
public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
|
public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
|
||||||
probing = false
|
probing = false
|
||||||
|
|
||||||
@ -562,6 +659,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension SocketEngine {
|
extension SocketEngine {
|
||||||
|
// MARK: URLSessionDelegate methods
|
||||||
|
|
||||||
|
/// Delegate called when the session becomes invalid.
|
||||||
public func URLSession(session: URLSession, didBecomeInvalidWithError error: NSError?) {
|
public func URLSession(session: URLSession, didBecomeInvalidWithError error: NSError?) {
|
||||||
DefaultSocketLogger.Logger.error("Engine URLSession became invalid", type: "SocketEngine")
|
DefaultSocketLogger.Logger.error("Engine URLSession became invalid", type: "SocketEngine")
|
||||||
|
|
||||||
|
|||||||
@ -25,10 +25,32 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@objc public protocol SocketEngineClient {
|
/// Declares that a type will be a delegate to an engine.
|
||||||
|
@objc public protocol SocketEngineClient {
|
||||||
|
// MARK: Methods
|
||||||
|
|
||||||
|
/// Called when the engine errors.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason the engine errored.
|
||||||
func engineDidError(reason: String)
|
func engineDidError(reason: String)
|
||||||
|
|
||||||
|
/// Called when the engine closes.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason that the engine closed.
|
||||||
func engineDidClose(reason: String)
|
func engineDidClose(reason: String)
|
||||||
|
|
||||||
|
/// Called when the engine opens.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason the engine opened.
|
||||||
func engineDidOpen(reason: String)
|
func engineDidOpen(reason: String)
|
||||||
|
|
||||||
|
/// Called when the engine has a message that must be parsed.
|
||||||
|
///
|
||||||
|
/// - parameter msg: The message that needs parsing.
|
||||||
func parseEngineMessage(_ msg: String)
|
func parseEngineMessage(_ msg: String)
|
||||||
|
|
||||||
|
/// Called when the engine receives binary data.
|
||||||
|
///
|
||||||
|
/// - parameter data: The data the engine received.
|
||||||
func parseEngineBinaryData(_ data: Data)
|
func parseEngineBinaryData(_ data: Data)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,26 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// Represents the type of engine.io packet types.
|
||||||
@objc public enum SocketEnginePacketType : Int {
|
@objc public enum SocketEnginePacketType : Int {
|
||||||
case open, close, ping, pong, message, upgrade, noop
|
/// Open message.
|
||||||
}
|
case open
|
||||||
|
|
||||||
|
/// Close message.
|
||||||
|
case close
|
||||||
|
|
||||||
|
/// Ping message.
|
||||||
|
case ping
|
||||||
|
|
||||||
|
/// Pong message.
|
||||||
|
case pong
|
||||||
|
|
||||||
|
/// Regular message.
|
||||||
|
case message
|
||||||
|
|
||||||
|
/// Upgrade message.
|
||||||
|
case upgrade
|
||||||
|
|
||||||
|
/// NOOP.
|
||||||
|
case noop
|
||||||
|
}
|
||||||
|
|||||||
@ -26,20 +26,46 @@ import Foundation
|
|||||||
|
|
||||||
/// Protocol that is used to implement socket.io polling support
|
/// Protocol that is used to implement socket.io polling support
|
||||||
public protocol SocketEnginePollable : SocketEngineSpec {
|
public protocol SocketEnginePollable : SocketEngineSpec {
|
||||||
|
/// MARK: Properties
|
||||||
|
|
||||||
|
/// `true` If engine's session has been invalidated.
|
||||||
var invalidated: Bool { get }
|
var invalidated: Bool { get }
|
||||||
/// Holds strings waiting to be sent over polling.
|
|
||||||
/// You shouldn't need to mess with this.
|
/// A queue of engine.io messages waiting for POSTing
|
||||||
|
///
|
||||||
|
/// **You should not touch this directly**
|
||||||
var postWait: [String] { get set }
|
var postWait: [String] { get set }
|
||||||
|
|
||||||
|
/// The URLSession that will be used for polling.
|
||||||
var session: URLSession? { get }
|
var session: URLSession? { get }
|
||||||
/// Because socket.io doesn't let you send two polling request at the same time
|
|
||||||
/// we have to keep track if there's an outstanding poll
|
/// `true` if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to
|
||||||
|
/// disconnect us.
|
||||||
|
///
|
||||||
|
/// **Do not touch this directly**
|
||||||
var waitingForPoll: Bool { get set }
|
var waitingForPoll: Bool { get set }
|
||||||
/// Because socket.io doesn't let you send two post request at the same time
|
|
||||||
/// we have to keep track if there's an outstanding post
|
/// `true` if there is an outstanding post. Trying to post before the first is done will cause socket.io to
|
||||||
|
/// disconnect us.
|
||||||
|
///
|
||||||
|
/// **Do not touch this directly**
|
||||||
var waitingForPost: Bool { get set }
|
var waitingForPost: Bool { get set }
|
||||||
|
|
||||||
|
/// Call to send a long-polling request.
|
||||||
|
///
|
||||||
|
/// You shouldn't need to call this directly, the engine should automatically maintain a long-poll request.
|
||||||
func doPoll()
|
func doPoll()
|
||||||
|
|
||||||
|
/// Sends an engine.io message through the polling transport.
|
||||||
|
///
|
||||||
|
/// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to send.
|
||||||
|
/// - parameter withType: The type of message to send.
|
||||||
|
/// - parameter withData: The data associated with this message.
|
||||||
func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data])
|
func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data])
|
||||||
|
|
||||||
|
/// Call to stop polling and invalidate the URLSession.
|
||||||
func stopPolling()
|
func stopPolling()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +115,9 @@ extension SocketEnginePollable {
|
|||||||
return req
|
return req
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Call to send a long-polling request.
|
||||||
|
///
|
||||||
|
/// You shouldn't need to call this directly, the engine should automatically maintain a long-poll request.
|
||||||
public func doPoll() {
|
public func doPoll() {
|
||||||
if websocket || waitingForPoll || !connected || closed {
|
if websocket || waitingForPoll || !connected || closed {
|
||||||
return
|
return
|
||||||
@ -194,8 +223,13 @@ extension SocketEnginePollable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send polling message.
|
/// Sends an engine.io message through the polling transport.
|
||||||
/// Only call on emitQueue
|
///
|
||||||
|
/// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to send.
|
||||||
|
/// - parameter withType: The type of message to send.
|
||||||
|
/// - parameter withData: The data associated with this message.
|
||||||
public func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data]) {
|
public func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data]) {
|
||||||
DefaultSocketLogger.Logger.log("Sending poll: %@ as type: %@", type: "SocketEnginePolling", args: message, type.rawValue)
|
DefaultSocketLogger.Logger.log("Sending poll: %@ as type: %@", type: "SocketEnginePolling", args: message, type.rawValue)
|
||||||
let fixedMessage: String
|
let fixedMessage: String
|
||||||
@ -219,6 +253,7 @@ extension SocketEnginePollable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Call to stop polling and invalidate the URLSession.
|
||||||
public func stopPolling() {
|
public func stopPolling() {
|
||||||
waitingForPoll = false
|
waitingForPoll = false
|
||||||
waitingForPost = false
|
waitingForPost = false
|
||||||
|
|||||||
@ -25,36 +25,113 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// Specifies a SocketEngine.
|
||||||
@objc public protocol SocketEngineSpec {
|
@objc public protocol SocketEngineSpec {
|
||||||
|
/// The client for this engine.
|
||||||
weak var client: SocketEngineClient? { get set }
|
weak var client: SocketEngineClient? { get set }
|
||||||
|
|
||||||
|
/// `true` if this engine is closed.
|
||||||
var closed: Bool { get }
|
var closed: Bool { get }
|
||||||
|
|
||||||
|
/// `true` if this engine is connected. Connected means that the initial poll connect has succeeded.
|
||||||
var connected: Bool { get }
|
var connected: Bool { get }
|
||||||
|
|
||||||
|
/// The connect parameters sent during a connect.
|
||||||
var connectParams: [String: Any]? { get set }
|
var connectParams: [String: Any]? { get set }
|
||||||
|
|
||||||
|
/// Set to `true` if using the node.js version of socket.io. The node.js version of socket.io
|
||||||
|
/// handles utf8 incorrectly.
|
||||||
var doubleEncodeUTF8: Bool { get }
|
var doubleEncodeUTF8: Bool { get }
|
||||||
|
|
||||||
|
/// An array of HTTPCookies that are sent during the connection.
|
||||||
var cookies: [HTTPCookie]? { get }
|
var cookies: [HTTPCookie]? { get }
|
||||||
|
|
||||||
|
/// The queue that all engine actions take place on.
|
||||||
var engineQueue: DispatchQueue { get }
|
var engineQueue: DispatchQueue { get }
|
||||||
|
|
||||||
|
/// A dictionary of extra http headers that will be set during connection.
|
||||||
var extraHeaders: [String: String]? { get }
|
var extraHeaders: [String: String]? { get }
|
||||||
|
|
||||||
|
/// When `true`, the engine is in the process of switching to WebSockets.
|
||||||
var fastUpgrade: Bool { get }
|
var fastUpgrade: Bool { get }
|
||||||
|
|
||||||
|
/// When `true`, the engine will only use HTTP long-polling as a transport.
|
||||||
var forcePolling: Bool { get }
|
var forcePolling: Bool { get }
|
||||||
|
|
||||||
|
/// When `true`, the engine will only use WebSockets as a transport.
|
||||||
var forceWebsockets: Bool { get }
|
var forceWebsockets: Bool { get }
|
||||||
|
|
||||||
|
/// If `true`, the engine is currently in HTTP long-polling mode.
|
||||||
var polling: Bool { get }
|
var polling: Bool { get }
|
||||||
|
|
||||||
|
/// If `true`, the engine is currently seeing whether it can upgrade to WebSockets.
|
||||||
var probing: Bool { get }
|
var probing: Bool { get }
|
||||||
|
|
||||||
|
/// The session id for this engine.
|
||||||
var sid: String { get }
|
var sid: String { get }
|
||||||
|
|
||||||
|
/// The path to engine.io.
|
||||||
var socketPath: String { get }
|
var socketPath: String { get }
|
||||||
|
|
||||||
|
/// The url for polling.
|
||||||
var urlPolling: URL { get }
|
var urlPolling: URL { get }
|
||||||
|
|
||||||
|
/// The url for WebSockets.
|
||||||
var urlWebSocket: URL { get }
|
var urlWebSocket: URL { get }
|
||||||
|
|
||||||
|
/// If `true`, then the engine is currently in WebSockets mode.
|
||||||
var websocket: Bool { get }
|
var websocket: Bool { get }
|
||||||
|
|
||||||
|
/// The WebSocket for this engine.
|
||||||
var ws: WebSocket? { get }
|
var ws: WebSocket? { get }
|
||||||
|
|
||||||
|
/// Creates a new engine.
|
||||||
|
///
|
||||||
|
/// - parameter client: The client for this engine.
|
||||||
|
/// - parameter url: The url for this engine.
|
||||||
|
/// - parameter options: The options for this engine.
|
||||||
init(client: SocketEngineClient, url: URL, options: NSDictionary?)
|
init(client: SocketEngineClient, url: URL, options: NSDictionary?)
|
||||||
|
|
||||||
|
/// Starts the connection to the server.
|
||||||
func connect()
|
func connect()
|
||||||
|
|
||||||
|
/// Called when an error happens during execution. Causes a disconnection.
|
||||||
func didError(reason: String)
|
func didError(reason: String)
|
||||||
|
|
||||||
|
/// Disconnects from the server.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason for the disconnection. This is communicated up to the client.
|
||||||
func disconnect(reason: String)
|
func disconnect(reason: String)
|
||||||
|
|
||||||
|
/// Called to switch from HTTP long-polling to WebSockets. After calling this method the engine will be in
|
||||||
|
/// WebSocket mode.
|
||||||
|
///
|
||||||
|
/// **You shouldn't call this directly**
|
||||||
func doFastUpgrade()
|
func doFastUpgrade()
|
||||||
|
|
||||||
|
/// Causes any packets that were waiting for POSTing to be sent through the WebSocket. This happens because when
|
||||||
|
/// the engine is attempting to upgrade to WebSocket it does not do any POSTing.
|
||||||
|
///
|
||||||
|
/// **You shouldn't call this directly**
|
||||||
func flushWaitingForPostToWebSocket()
|
func flushWaitingForPostToWebSocket()
|
||||||
|
|
||||||
|
/// Parses raw binary received from engine.io.
|
||||||
|
///
|
||||||
|
/// - parameter data: The data to parse.
|
||||||
func parseEngineData(_ data: Data)
|
func parseEngineData(_ data: Data)
|
||||||
|
|
||||||
|
/// Parses a raw engine.io packet.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to parse.
|
||||||
|
/// - parameter fromPolling: Whether this message is from long-polling.
|
||||||
|
/// If `true` we might have to fix utf8 encoding.
|
||||||
func parseEngineMessage(_ message: String, fromPolling: Bool)
|
func parseEngineMessage(_ message: String, fromPolling: Bool)
|
||||||
|
|
||||||
|
/// Writes a message to engine.io, independent of transport.
|
||||||
|
///
|
||||||
|
/// - parameter msg: The message to send.
|
||||||
|
/// - parameter withType: The type of this message.
|
||||||
|
/// - parameter withData: Any data that this message has.
|
||||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
|
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,32 +139,32 @@ extension SocketEngineSpec {
|
|||||||
var urlPollingWithSid: URL {
|
var urlPollingWithSid: URL {
|
||||||
var com = URLComponents(url: urlPolling, resolvingAgainstBaseURL: false)!
|
var com = URLComponents(url: urlPolling, resolvingAgainstBaseURL: false)!
|
||||||
com.percentEncodedQuery = com.percentEncodedQuery! + "&sid=\(sid.urlEncode()!)"
|
com.percentEncodedQuery = com.percentEncodedQuery! + "&sid=\(sid.urlEncode()!)"
|
||||||
|
|
||||||
return com.url!
|
return com.url!
|
||||||
}
|
}
|
||||||
|
|
||||||
var urlWebSocketWithSid: URL {
|
var urlWebSocketWithSid: URL {
|
||||||
var com = URLComponents(url: urlWebSocket, resolvingAgainstBaseURL: false)!
|
var com = URLComponents(url: urlWebSocket, resolvingAgainstBaseURL: false)!
|
||||||
com.percentEncodedQuery = com.percentEncodedQuery! + (sid == "" ? "" : "&sid=\(sid.urlEncode()!)")
|
com.percentEncodedQuery = com.percentEncodedQuery! + (sid == "" ? "" : "&sid=\(sid.urlEncode()!)")
|
||||||
|
|
||||||
return com.url!
|
return com.url!
|
||||||
}
|
}
|
||||||
|
|
||||||
func createBinaryDataForSend(using data: Data) -> Either<Data, String> {
|
func createBinaryDataForSend(using data: Data) -> Either<Data, String> {
|
||||||
if websocket {
|
if websocket {
|
||||||
var byteArray = [UInt8](repeating: 0x4, count: 1)
|
var byteArray = [UInt8](repeating: 0x4, count: 1)
|
||||||
let mutData = NSMutableData(bytes: &byteArray, length: 1)
|
let mutData = NSMutableData(bytes: &byteArray, length: 1)
|
||||||
|
|
||||||
mutData.append(data)
|
mutData.append(data)
|
||||||
|
|
||||||
return .left(mutData as Data)
|
return .left(mutData as Data)
|
||||||
} else {
|
} else {
|
||||||
let str = "b4" + data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
|
let str = "b4" + data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))
|
||||||
|
|
||||||
return .right(str)
|
return .right(str)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func doubleEncodeUTF8(_ string: String) -> String {
|
func doubleEncodeUTF8(_ string: String) -> String {
|
||||||
if let latin1 = string.data(using: String.Encoding.utf8),
|
if let latin1 = string.data(using: String.Encoding.utf8),
|
||||||
let utf8 = NSString(data: latin1, encoding: String.Encoding.isoLatin1.rawValue) {
|
let utf8 = NSString(data: latin1, encoding: String.Encoding.isoLatin1.rawValue) {
|
||||||
@ -96,7 +173,7 @@ extension SocketEngineSpec {
|
|||||||
return string
|
return string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func fixDoubleUTF8(_ string: String) -> String {
|
func fixDoubleUTF8(_ string: String) -> String {
|
||||||
if let utf8 = string.data(using: String.Encoding.isoLatin1),
|
if let utf8 = string.data(using: String.Encoding.isoLatin1),
|
||||||
let latin1 = NSString(data: utf8, encoding: String.Encoding.utf8.rawValue) {
|
let latin1 = NSString(data: utf8, encoding: String.Encoding.utf8.rawValue) {
|
||||||
@ -105,7 +182,7 @@ extension SocketEngineSpec {
|
|||||||
return string
|
return string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send an engine message (4)
|
/// Send an engine message (4)
|
||||||
func send(_ msg: String, withData datas: [Data]) {
|
func send(_ msg: String, withData datas: [Data]) {
|
||||||
write(msg, withType: .message, withData: datas)
|
write(msg, withType: .message, withData: datas)
|
||||||
|
|||||||
@ -27,6 +27,13 @@ import Foundation
|
|||||||
|
|
||||||
/// Protocol that is used to implement socket.io WebSocket support
|
/// Protocol that is used to implement socket.io WebSocket support
|
||||||
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate {
|
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate {
|
||||||
|
/// Sends an engine.io message through the WebSocket transport.
|
||||||
|
///
|
||||||
|
/// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to send.
|
||||||
|
/// - parameter withType: The type of message to send.
|
||||||
|
/// - parameter withData: The data associated with this message.
|
||||||
func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data])
|
func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,25 +44,34 @@ extension SocketEngineWebsocket {
|
|||||||
sendWebSocketMessage("probe", withType: .ping, withData: [])
|
sendWebSocketMessage("probe", withType: .ping, withData: [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send message on WebSockets
|
/// Sends an engine.io message through the WebSocket transport.
|
||||||
/// Only call on emitQueue
|
///
|
||||||
|
/// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.
|
||||||
|
///
|
||||||
|
/// - parameter message: The message to send.
|
||||||
|
/// - parameter withType: The type of message to send.
|
||||||
|
/// - parameter withData: The data associated with this message.
|
||||||
public func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data]) {
|
public func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data]) {
|
||||||
DefaultSocketLogger.Logger.log("Sending ws: %@ as type: %@", type: "SocketEngine", args: str, type.rawValue)
|
DefaultSocketLogger.Logger.log("Sending ws: %@ as type: %@", type: "SocketEngine", args: str, type.rawValue)
|
||||||
|
|
||||||
ws?.write(string: "\(type.rawValue)\(str)")
|
ws?.write(string: "\(type.rawValue)\(str)")
|
||||||
|
|
||||||
for data in datas {
|
for data in datas {
|
||||||
if case let .left(bin) = createBinaryDataForSend(using: data) {
|
if case let .left(bin) = createBinaryDataForSend(using: data) {
|
||||||
ws?.write(data: bin)
|
ws?.write(data: bin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Starscream delegate methods
|
||||||
|
|
||||||
|
/// Delegate method for when a message is received.
|
||||||
public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
|
public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
|
||||||
parseEngineMessage(text, fromPolling: false)
|
parseEngineMessage(text, fromPolling: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Delegate method for when binary is received.
|
||||||
public func websocketDidReceiveData(socket: WebSocket, data: Data) {
|
public func websocketDidReceiveData(socket: WebSocket, data: Data) {
|
||||||
parseEngineData(data)
|
parseEngineData(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,10 +25,19 @@
|
|||||||
import Dispatch
|
import Dispatch
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// The main class for SocketIOClientSwift.
|
||||||
|
///
|
||||||
|
/// Represents a socket.io-client. Most interaction with socket.io will be through this class.
|
||||||
open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, SocketParsable {
|
open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, SocketParsable {
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// The URL of the socket.io server. This is set in the initializer.
|
||||||
public let socketURL: URL
|
public let socketURL: URL
|
||||||
|
|
||||||
|
/// The engine for this client.
|
||||||
public private(set) var engine: SocketEngineSpec?
|
public private(set) var engine: SocketEngineSpec?
|
||||||
|
|
||||||
|
/// The status of this client.
|
||||||
public private(set) var status = SocketIOClientStatus.notConnected {
|
public private(set) var status = SocketIOClientStatus.notConnected {
|
||||||
didSet {
|
didSet {
|
||||||
switch status {
|
switch status {
|
||||||
@ -41,13 +50,30 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// If `true` then every time `connect` is called, a new engine will be created.
|
||||||
public var forceNew = false
|
public var forceNew = false
|
||||||
|
|
||||||
|
/// The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||||
|
/// called on.
|
||||||
public var handleQueue = DispatchQueue.main
|
public var handleQueue = DispatchQueue.main
|
||||||
|
|
||||||
|
/// The namespace for this client.
|
||||||
public var nsp = "/"
|
public var nsp = "/"
|
||||||
|
|
||||||
|
/// The configuration for this client.
|
||||||
public var config: SocketIOClientConfiguration
|
public var config: SocketIOClientConfiguration
|
||||||
|
|
||||||
|
/// If `true`, this client will try and reconnect on any disconnects.
|
||||||
public var reconnects = true
|
public var reconnects = true
|
||||||
|
|
||||||
|
/// The number of seconds to wait before attempting to reconnect.
|
||||||
public var reconnectWait = 10
|
public var reconnectWait = 10
|
||||||
|
|
||||||
|
/// The session id of this client.
|
||||||
|
public var sid: String? {
|
||||||
|
return engine?.sid
|
||||||
|
}
|
||||||
|
|
||||||
private let logType = "SocketIOClient"
|
private let logType = "SocketIOClient"
|
||||||
|
|
||||||
private var anyHandler: ((SocketAnyEvent) -> Void)?
|
private var anyHandler: ((SocketAnyEvent) -> Void)?
|
||||||
@ -61,11 +87,12 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
var ackHandlers = SocketAckManager()
|
var ackHandlers = SocketAckManager()
|
||||||
var waitingPackets = [SocketPacket]()
|
var waitingPackets = [SocketPacket]()
|
||||||
|
|
||||||
public var sid: String? {
|
// MARK: Initializers
|
||||||
return engine?.sid
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Type safe way to create a new SocketIOClient. opts can be omitted
|
/// Type safe way to create a new SocketIOClient. `opts` can be omitted.
|
||||||
|
///
|
||||||
|
/// - parameter socketURL: The url of the socket.io server.
|
||||||
|
/// - parameter config: The config for this socket.
|
||||||
public init(socketURL: URL, config: SocketIOClientConfiguration = []) {
|
public init(socketURL: URL, config: SocketIOClientConfiguration = []) {
|
||||||
self.config = config
|
self.config = config
|
||||||
self.socketURL = socketURL
|
self.socketURL = socketURL
|
||||||
@ -104,6 +131,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
|
|
||||||
/// Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.
|
/// Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.
|
||||||
/// If using Swift it's recommended to use `init(socketURL: NSURL, options: Set<SocketIOClientOption>)`
|
/// If using Swift it's recommended to use `init(socketURL: NSURL, options: Set<SocketIOClientOption>)`
|
||||||
|
///
|
||||||
|
/// - parameter socketURL: The url of the socket.io server.
|
||||||
|
/// - parameter config: The config for this socket.
|
||||||
public convenience init(socketURL: NSURL, config: NSDictionary?) {
|
public convenience init(socketURL: NSURL, config: NSDictionary?) {
|
||||||
self.init(socketURL: socketURL as URL, config: config?.toSocketConfiguration() ?? [])
|
self.init(socketURL: socketURL as URL, config: config?.toSocketConfiguration() ?? [])
|
||||||
}
|
}
|
||||||
@ -113,6 +143,8 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
engine?.disconnect(reason: "Client Deinit")
|
engine?.disconnect(reason: "Client Deinit")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Methods
|
||||||
|
|
||||||
private func addEngine() -> SocketEngineSpec {
|
private func addEngine() -> SocketEngineSpec {
|
||||||
DefaultSocketLogger.Logger.log("Adding engine", type: logType, args: "")
|
DefaultSocketLogger.Logger.log("Adding engine", type: logType, args: "")
|
||||||
|
|
||||||
@ -127,8 +159,11 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
connect(timeoutAfter: 0, withHandler: nil)
|
connect(timeoutAfter: 0, withHandler: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Connect to the server. If we aren't connected after timeoutAfter, call withHandler
|
/// Connect to the server. If we aren't connected after `timeoutAfter` seconds, then `withHandler` is called.
|
||||||
/// 0 Never times out
|
///
|
||||||
|
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
|
||||||
|
/// has failed. Pass 0 to never timeout.
|
||||||
|
/// - 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: (() -> Void)?) {
|
||||||
assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)")
|
assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)")
|
||||||
|
|
||||||
@ -194,12 +229,18 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
didDisconnect(reason: "Disconnect")
|
didDisconnect(reason: "Disconnect")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send a message to the server
|
/// Send an event to the server, with optional data items.
|
||||||
|
///
|
||||||
|
/// - parameter event: The event to send.
|
||||||
|
/// - parameter items: The items to send with this event. May be left out.
|
||||||
open func emit(_ event: String, _ items: SocketData...) {
|
open func emit(_ event: String, _ items: SocketData...) {
|
||||||
emit(event, with: items)
|
emit(event, with: items)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Same as emit, but meant for Objective-C
|
/// Same as emit, but meant for Objective-C
|
||||||
|
///
|
||||||
|
/// - parameter event: The event to send.
|
||||||
|
/// - parameter with: The items to send with this event. May be left out.
|
||||||
open func emit(_ event: String, with items: [Any]) {
|
open func emit(_ event: String, with items: [Any]) {
|
||||||
guard status == .connected else {
|
guard status == .connected else {
|
||||||
handleEvent("error", data: ["Tried emitting \(event) when not connected"], isInternalMessage: true)
|
handleEvent("error", data: ["Tried emitting \(event) when not connected"], isInternalMessage: true)
|
||||||
@ -209,13 +250,42 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
_emit([event] + items)
|
_emit([event] + items)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sends a message to the server, requesting an ack. Use the onAck method of SocketAckHandler to add
|
/// Sends a message to the server, requesting an ack.
|
||||||
/// an ack.
|
///
|
||||||
|
/// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.
|
||||||
|
/// Check that your server's api will ack the event being sent.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
///
|
||||||
|
/// ```swift
|
||||||
|
/// socket.emitWithAck("myEvent", 1).timingOut(after: 1) {data in
|
||||||
|
/// ...
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// - parameter event: The event to send.
|
||||||
|
/// - parameter items: The items to send with this event. May be left out.
|
||||||
|
/// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.
|
||||||
open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback {
|
open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback {
|
||||||
return emitWithAck(event, with: items)
|
return emitWithAck(event, with: items)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Same as emitWithAck, but for Objective-C
|
/// Same as emitWithAck, but for Objective-C
|
||||||
|
///
|
||||||
|
/// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.
|
||||||
|
/// Check that your server's api will ack the event being sent.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
///
|
||||||
|
/// ```swift
|
||||||
|
/// socket.emitWithAck("myEvent", with: [1]).timingOut(after: 1) {data in
|
||||||
|
/// ...
|
||||||
|
/// }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// - parameter event: The event to send.
|
||||||
|
/// - parameter with: The items to send with this event. Use `[]` to send nothing.
|
||||||
|
/// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.
|
||||||
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {
|
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {
|
||||||
return createOnAck([event] + items)
|
return createOnAck([event] + items)
|
||||||
}
|
}
|
||||||
@ -246,6 +316,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
engine?.send(str, withData: packet.binary)
|
engine?.send(str, withData: packet.binary)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when the engine closes.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason that the engine closed.
|
||||||
open func engineDidClose(reason: String) {
|
open func engineDidClose(reason: String) {
|
||||||
handleQueue.async {
|
handleQueue.async {
|
||||||
self._engineDidClose(reason: reason)
|
self._engineDidClose(reason: reason)
|
||||||
@ -267,19 +340,24 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when the engine errors.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason the engine errored.
|
||||||
open func engineDidError(reason: String) {
|
open func engineDidError(reason: String) {
|
||||||
handleQueue.async {
|
handleQueue.async {
|
||||||
self._engineDidError(reason: reason)
|
self._engineDidError(reason: reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// error
|
|
||||||
private func _engineDidError(reason: String) {
|
private func _engineDidError(reason: String) {
|
||||||
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
||||||
|
|
||||||
handleEvent("error", data: [reason], isInternalMessage: true)
|
handleEvent("error", data: [reason], isInternalMessage: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when the engine opens.
|
||||||
|
///
|
||||||
|
/// - parameter reason: The reason the engine opened.
|
||||||
open func engineDidOpen(reason: String) {
|
open func engineDidOpen(reason: String) {
|
||||||
DefaultSocketLogger.Logger.log(reason, type: "SocketEngineClient")
|
DefaultSocketLogger.Logger.log(reason, type: "SocketEngineClient")
|
||||||
}
|
}
|
||||||
@ -293,7 +371,12 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
ackHandlers.executeAck(ack, with: data, onQueue: handleQueue)
|
ackHandlers.executeAck(ack, with: data, onQueue: handleQueue)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Causes an event to be handled. Only use if you know what you're doing.
|
/// Causes an event to be handled, and any event handlers for that event to be called.
|
||||||
|
///
|
||||||
|
/// - parameter event: The event that is to be handled.
|
||||||
|
/// - parameter data: the data associated with this event.
|
||||||
|
/// - parameter isInternalMessage: If `true` event handlers for this event will be called regardless of status.
|
||||||
|
/// - parameter withAck: The ack number for this event. May be left out.
|
||||||
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1) {
|
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1) {
|
||||||
guard status == .connected || isInternalMessage else { return }
|
guard status == .connected || isInternalMessage else { return }
|
||||||
|
|
||||||
@ -306,7 +389,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Leaves nsp and goes back to /
|
/// Leaves nsp and goes back to the default namespace.
|
||||||
open func leaveNamespace() {
|
open func leaveNamespace() {
|
||||||
if nsp != "/" {
|
if nsp != "/" {
|
||||||
engine?.send("1\(nsp)", withData: [])
|
engine?.send("1\(nsp)", withData: [])
|
||||||
@ -314,7 +397,11 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Joins namespace
|
/// Joins `namespace`.
|
||||||
|
///
|
||||||
|
/// **Do not use this to join the default namespace.** Instead call `leaveNamespace`.
|
||||||
|
///
|
||||||
|
/// - parameter namespace: The namespace to join.
|
||||||
open func joinNamespace(_ namespace: String) {
|
open func joinNamespace(_ namespace: String) {
|
||||||
nsp = namespace
|
nsp = namespace
|
||||||
|
|
||||||
@ -324,7 +411,11 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Removes handler(s) based on name
|
/// Removes handler(s) based on an event name.
|
||||||
|
///
|
||||||
|
/// If you wish to remove a specific event, call the `off(if:)` with the UUID received from its `on` call.
|
||||||
|
///
|
||||||
|
/// - parameter event: The event to remove handlers for.
|
||||||
open func off(_ event: String) {
|
open func off(_ event: String) {
|
||||||
DefaultSocketLogger.Logger.log("Removing handler for event: %@", type: logType, args: event)
|
DefaultSocketLogger.Logger.log("Removing handler for event: %@", type: logType, args: event)
|
||||||
|
|
||||||
@ -332,6 +423,10 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Removes a handler with the specified UUID gotten from an `on` or `once`
|
/// Removes a handler with the specified UUID gotten from an `on` or `once`
|
||||||
|
///
|
||||||
|
/// If you want to remove all events for an event, call the off `off(_:)` method with the event name.
|
||||||
|
///
|
||||||
|
/// - parameter id: The UUID of the handler you wish to remove.
|
||||||
open func off(id: UUID) {
|
open func off(id: UUID) {
|
||||||
DefaultSocketLogger.Logger.log("Removing handler with id: %@", type: logType, args: id)
|
DefaultSocketLogger.Logger.log("Removing handler with id: %@", type: logType, args: id)
|
||||||
|
|
||||||
@ -339,7 +434,10 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a handler for an event.
|
/// Adds a handler for an event.
|
||||||
/// Returns: A unique id for the handler
|
///
|
||||||
|
/// - parameter event: The event name for this handler.
|
||||||
|
/// - parameter callback: The callback that will execute when this event is received.
|
||||||
|
/// - returns: A unique id for the handler that can be used to remove it.
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func on(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
open func on(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
||||||
DefaultSocketLogger.Logger.log("Adding handler for event: %@", type: logType, args: event)
|
DefaultSocketLogger.Logger.log("Adding handler for event: %@", type: logType, args: event)
|
||||||
@ -351,7 +449,10 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Adds a single-use handler for an event.
|
/// Adds a single-use handler for an event.
|
||||||
/// Returns: A unique id for the handler
|
///
|
||||||
|
/// - parameter event: The event name for this handler.
|
||||||
|
/// - parameter callback: The callback that will execute when this event is received.
|
||||||
|
/// - returns: A unique id for the handler that can be used to remove it.
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func once(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
open func once(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
||||||
DefaultSocketLogger.Logger.log("Adding once handler for event: %@", type: logType, args: event)
|
DefaultSocketLogger.Logger.log("Adding once handler for event: %@", type: logType, args: event)
|
||||||
@ -370,21 +471,31 @@ 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.
|
||||||
open func onAny(_ handler: @escaping (SocketAnyEvent) -> Void) {
|
open func onAny(_ handler: @escaping (SocketAnyEvent) -> Void) {
|
||||||
anyHandler = handler
|
anyHandler = handler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when the engine has a message that must be parsed.
|
||||||
|
///
|
||||||
|
/// - parameter msg: The message that needs parsing.
|
||||||
public func parseEngineMessage(_ msg: String) {
|
public func parseEngineMessage(_ msg: String) {
|
||||||
DefaultSocketLogger.Logger.log("Should parse message: %@", type: "SocketIOClient", args: msg)
|
DefaultSocketLogger.Logger.log("Should parse message: %@", type: "SocketIOClient", args: msg)
|
||||||
|
|
||||||
handleQueue.async { self.parseSocketMessage(msg) }
|
handleQueue.async { self.parseSocketMessage(msg) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Called when the engine receives binary data.
|
||||||
|
///
|
||||||
|
/// - parameter data: The data the engine received.
|
||||||
public func parseEngineBinaryData(_ data: Data) {
|
public func parseEngineBinaryData(_ data: Data) {
|
||||||
handleQueue.async { self.parseBinaryData(data) }
|
handleQueue.async { self.parseBinaryData(data) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Tries to reconnect to the server.
|
/// Tries to reconnect to the server.
|
||||||
|
///
|
||||||
|
/// This will cause a `disconnect` event to be emitted, as well as an `reconnectAttempt` event.
|
||||||
open func reconnect() {
|
open func reconnect() {
|
||||||
guard !reconnecting else { return }
|
guard !reconnecting else { return }
|
||||||
|
|
||||||
|
|||||||
@ -22,39 +22,56 @@
|
|||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
|
/// An array-like type that holds `SocketIOClientOption`s
|
||||||
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection {
|
public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection {
|
||||||
|
// MARK: Typealiases
|
||||||
|
|
||||||
|
/// Type of element stored.
|
||||||
public typealias Element = SocketIOClientOption
|
public typealias Element = SocketIOClientOption
|
||||||
|
|
||||||
|
/// Index type.
|
||||||
public typealias Index = Array<SocketIOClientOption>.Index
|
public typealias Index = Array<SocketIOClientOption>.Index
|
||||||
public typealias Generator = Array<SocketIOClientOption>.Iterator
|
|
||||||
|
/// Iterator type.
|
||||||
|
public typealias Iterator = Array<SocketIOClientOption>.Iterator
|
||||||
|
|
||||||
|
/// SubSequence type.
|
||||||
public typealias SubSequence = Array<SocketIOClientOption>.SubSequence
|
public typealias SubSequence = Array<SocketIOClientOption>.SubSequence
|
||||||
|
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
private var backingArray = [SocketIOClientOption]()
|
private var backingArray = [SocketIOClientOption]()
|
||||||
|
|
||||||
|
/// The start index of this collection.
|
||||||
public var startIndex: Index {
|
public var startIndex: Index {
|
||||||
return backingArray.startIndex
|
return backingArray.startIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The end index of this collection.
|
||||||
public var endIndex: Index {
|
public var endIndex: Index {
|
||||||
return backingArray.endIndex
|
return backingArray.endIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Whether this collection is empty.
|
||||||
public var isEmpty: Bool {
|
public var isEmpty: Bool {
|
||||||
return backingArray.isEmpty
|
return backingArray.isEmpty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The number of elements stored in this collection.
|
||||||
public var count: Index.Stride {
|
public var count: Index.Stride {
|
||||||
return backingArray.count
|
return backingArray.count
|
||||||
}
|
}
|
||||||
|
|
||||||
public var first: Generator.Element? {
|
/// The first element in this collection.
|
||||||
|
public var first: Element? {
|
||||||
return backingArray.first
|
return backingArray.first
|
||||||
}
|
}
|
||||||
|
|
||||||
public subscript(position: Index) -> Generator.Element {
|
public subscript(position: Index) -> Element {
|
||||||
get {
|
get {
|
||||||
return backingArray[position]
|
return backingArray[position]
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
backingArray[position] = newValue
|
backingArray[position] = newValue
|
||||||
}
|
}
|
||||||
@ -64,45 +81,49 @@ public struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collectio
|
|||||||
get {
|
get {
|
||||||
return backingArray[bounds]
|
return backingArray[bounds]
|
||||||
}
|
}
|
||||||
|
|
||||||
set {
|
set {
|
||||||
backingArray[bounds] = newValue
|
backingArray[bounds] = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: Initializers
|
||||||
|
|
||||||
|
/// Creates a new `SocketIOClientConfiguration` from an array literal.
|
||||||
|
///
|
||||||
|
/// - parameter arrayLiteral: The elements.
|
||||||
public init(arrayLiteral elements: Element...) {
|
public init(arrayLiteral elements: Element...) {
|
||||||
backingArray = elements
|
backingArray = elements
|
||||||
}
|
}
|
||||||
|
|
||||||
public func generate() -> Generator {
|
// MARK: Methods
|
||||||
|
|
||||||
|
/// Creates an iterator for this collection.
|
||||||
|
///
|
||||||
|
/// - returns: An iterator over this collection.
|
||||||
|
public func makeIterator() -> Iterator {
|
||||||
return backingArray.makeIterator()
|
return backingArray.makeIterator()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// - returns: The index after index.
|
||||||
public func index(after i: Index) -> Index {
|
public func index(after i: Index) -> Index {
|
||||||
return backingArray.index(after: i)
|
return backingArray.index(after: i)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Special method that inserts `element` into the collection, replacing any other instances of `element`.
|
||||||
|
///
|
||||||
|
/// - parameter element: The element to insert.
|
||||||
|
/// - parameter replacing: Whether to replace any occurrences of element to the new item. Default is `true`.
|
||||||
public mutating func insert(_ element: Element, replacing replace: Bool = true) {
|
public mutating func insert(_ element: Element, replacing replace: Bool = true) {
|
||||||
for i in 0..<backingArray.count where backingArray[i] == element {
|
for i in 0..<backingArray.count where backingArray[i] == element {
|
||||||
guard replace else { return }
|
guard replace else { return }
|
||||||
|
|
||||||
backingArray[i] = element
|
backingArray[i] = element
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
backingArray.append(element)
|
backingArray.append(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func prefix(upTo end: Index) -> SubSequence {
|
|
||||||
return backingArray.prefix(upTo: end)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func prefix(through position: Index) -> SubSequence {
|
|
||||||
return backingArray.prefix(through: position)
|
|
||||||
}
|
|
||||||
|
|
||||||
public func suffix(from start: Index) -> SubSequence {
|
|
||||||
return backingArray.suffix(from: start)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,31 +28,80 @@ protocol ClientOption : CustomStringConvertible, Equatable {
|
|||||||
func getSocketIOOptionValue() -> Any
|
func getSocketIOOptionValue() -> Any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The options for a client.
|
||||||
public enum SocketIOClientOption : ClientOption {
|
public enum SocketIOClientOption : ClientOption {
|
||||||
|
/// A dictionary of GET parameters that will be included in the connect url.
|
||||||
case connectParams([String: Any])
|
case connectParams([String: Any])
|
||||||
|
|
||||||
|
/// An array of cookies that will be sent during the initial connection.
|
||||||
case cookies([HTTPCookie])
|
case cookies([HTTPCookie])
|
||||||
|
|
||||||
|
/// The node.js socket.io currently does funky things to unicode when doing HTTP long-polling. Passing `true` in
|
||||||
|
/// this option causes the client to try and fix any bad unicode that might be sent.
|
||||||
case doubleEncodeUTF8(Bool)
|
case doubleEncodeUTF8(Bool)
|
||||||
|
|
||||||
|
/// Any extra HTTP headers that should be sent during the initial connection.
|
||||||
case extraHeaders([String: String])
|
case extraHeaders([String: String])
|
||||||
|
|
||||||
|
/// If passed `true`, will cause the client to always create a new engine. Useful for debugging,
|
||||||
|
/// or when you want to be sure no state from previous engines is being carried over.
|
||||||
case forceNew(Bool)
|
case forceNew(Bool)
|
||||||
|
|
||||||
|
/// If passed `true`, the only transport that will be used will be HTTP long-polling.
|
||||||
case forcePolling(Bool)
|
case forcePolling(Bool)
|
||||||
|
|
||||||
|
/// If passed `true`, the only transport that will be used will be WebSockets.
|
||||||
case forceWebsockets(Bool)
|
case forceWebsockets(Bool)
|
||||||
|
|
||||||
|
/// The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||||
|
/// called on.
|
||||||
case handleQueue(DispatchQueue)
|
case handleQueue(DispatchQueue)
|
||||||
|
|
||||||
|
/// If passed `true`, the client will log debug information. This should be turned off in production code.
|
||||||
case log(Bool)
|
case log(Bool)
|
||||||
|
|
||||||
|
/// Used to pass in a custom logger.
|
||||||
case logger(SocketLogger)
|
case logger(SocketLogger)
|
||||||
|
|
||||||
|
/// The namespace that this client should connect to. Can be changed during use using the `joinNamespace`
|
||||||
|
/// and `leaveNamespace` methods on `SocketIOClient`.
|
||||||
case nsp(String)
|
case nsp(String)
|
||||||
|
|
||||||
|
/// A custom path to socket.io. Only use this if the socket.io server is configured to look for this path.
|
||||||
case path(String)
|
case path(String)
|
||||||
|
|
||||||
|
/// If passed `false`, the client will not reconnect when it loses connection. Useful if you want full control
|
||||||
|
/// over when reconnects happen.
|
||||||
case reconnects(Bool)
|
case reconnects(Bool)
|
||||||
|
|
||||||
|
/// The number of times to try and reconnect before giving up. Pass `-1` to [never give up](https://www.youtube.com/watch?v=dQw4w9WgXcQ).
|
||||||
case reconnectAttempts(Int)
|
case reconnectAttempts(Int)
|
||||||
|
|
||||||
|
/// The number of seconds to wait before reconnect attempts.
|
||||||
case reconnectWait(Int)
|
case reconnectWait(Int)
|
||||||
|
|
||||||
|
/// Set `true` if your server is using secure transports.
|
||||||
case secure(Bool)
|
case secure(Bool)
|
||||||
|
|
||||||
|
/// Allows you to set which certs are valid. Useful for SSL pinning.
|
||||||
case security(SSLSecurity)
|
case security(SSLSecurity)
|
||||||
|
|
||||||
|
/// If you're using a self-signed set. Only use for development.
|
||||||
case selfSigned(Bool)
|
case selfSigned(Bool)
|
||||||
|
|
||||||
|
/// Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs.
|
||||||
case sessionDelegate(URLSessionDelegate)
|
case sessionDelegate(URLSessionDelegate)
|
||||||
|
|
||||||
|
/// If passed `true`, the WebSocket transport will try and use voip logic to keep network connections open in
|
||||||
|
/// the background. **This option is experimental as socket.io shouldn't be used for background communication.**
|
||||||
case voipEnabled(Bool)
|
case voipEnabled(Bool)
|
||||||
|
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
|
/// The description of this option.
|
||||||
public var description: String {
|
public var description: String {
|
||||||
let description: String
|
let description: String
|
||||||
|
|
||||||
switch self {
|
switch self {
|
||||||
case .connectParams:
|
case .connectParams:
|
||||||
description = "connectParams"
|
description = "connectParams"
|
||||||
@ -95,13 +144,13 @@ public enum SocketIOClientOption : ClientOption {
|
|||||||
case .voipEnabled:
|
case .voipEnabled:
|
||||||
description = "voipEnabled"
|
description = "voipEnabled"
|
||||||
}
|
}
|
||||||
|
|
||||||
return description
|
return description
|
||||||
}
|
}
|
||||||
|
|
||||||
func getSocketIOOptionValue() -> Any {
|
func getSocketIOOptionValue() -> Any {
|
||||||
let value: Any
|
let value: Any
|
||||||
|
|
||||||
switch self {
|
switch self {
|
||||||
case let .connectParams(params):
|
case let .connectParams(params):
|
||||||
value = params
|
value = params
|
||||||
@ -144,11 +193,19 @@ public enum SocketIOClientOption : ClientOption {
|
|||||||
case let .voipEnabled(enabled):
|
case let .voipEnabled(enabled):
|
||||||
value = enabled
|
value = enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool {
|
// MARK: Operators
|
||||||
return lhs.description == rhs.description
|
|
||||||
|
/// Compares whether two options are the same.
|
||||||
|
///
|
||||||
|
/// - parameter lhs: Left operand to compare.
|
||||||
|
/// - parameter rhs: Right operand to compare.
|
||||||
|
/// - returns: `true` if the two are the same option.
|
||||||
|
public static func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool {
|
||||||
|
return lhs.description == rhs.description
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,9 +24,17 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
/// **NotConnected**: initial state
|
/// Represents the state of the client.
|
||||||
///
|
|
||||||
/// **Disconnected**: connected before
|
|
||||||
@objc public enum SocketIOClientStatus : Int {
|
@objc public enum SocketIOClientStatus : Int {
|
||||||
case notConnected, disconnected, connecting, connected
|
/// The client has never been connected. Or the client has been reset.
|
||||||
|
case notConnected
|
||||||
|
|
||||||
|
/// The client was once connected, but not anymore.
|
||||||
|
case disconnected
|
||||||
|
|
||||||
|
/// The client is in the process of connecting.
|
||||||
|
case connecting
|
||||||
|
|
||||||
|
/// The client is currently connected.
|
||||||
|
case connected
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,32 +24,47 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// Represents a class will log client events.
|
||||||
public protocol SocketLogger : class {
|
public protocol SocketLogger : class {
|
||||||
|
// MARK: Properties
|
||||||
|
|
||||||
/// Whether to log or not
|
/// Whether to log or not
|
||||||
var log: Bool { get set }
|
var log: Bool { get set }
|
||||||
|
|
||||||
|
// MARK: Methods
|
||||||
|
|
||||||
/// Normal log messages
|
/// Normal log messages
|
||||||
|
///
|
||||||
|
/// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`
|
||||||
|
/// - parameter type: The type of entity that called for logging.
|
||||||
|
/// - parameter args: Any args that should be inserted into the message. May be left out.
|
||||||
func log(_ message: String, type: String, args: Any...)
|
func log(_ message: String, type: String, args: Any...)
|
||||||
|
|
||||||
/// Error Messages
|
/// Error Messages
|
||||||
|
///
|
||||||
|
/// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`
|
||||||
|
/// - parameter type: The type of entity that called for logging.
|
||||||
|
/// - parameter args: Any args that should be inserted into the message. May be left out.
|
||||||
func error(_ message: String, type: String, args: Any...)
|
func error(_ message: String, type: String, args: Any...)
|
||||||
}
|
}
|
||||||
|
|
||||||
public extension SocketLogger {
|
public extension SocketLogger {
|
||||||
|
/// Default implementation.
|
||||||
func log(_ message: String, type: String, args: Any...) {
|
func log(_ message: String, type: String, args: Any...) {
|
||||||
abstractLog("LOG", message: message, type: type, args: args)
|
abstractLog("LOG", message: message, type: type, args: args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Default implementation.
|
||||||
func error(_ message: String, type: String, args: Any...) {
|
func error(_ message: String, type: String, args: Any...) {
|
||||||
abstractLog("ERROR", message: message, type: type, args: args)
|
abstractLog("ERROR", message: message, type: type, args: args)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
|
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
|
||||||
guard log else { return }
|
guard log else { return }
|
||||||
|
|
||||||
let newArgs = args.map({arg -> CVarArg in String(describing: arg)})
|
let newArgs = args.map({arg -> CVarArg in String(describing: arg)})
|
||||||
let messageFormat = String(format: message, arguments: newArgs)
|
let messageFormat = String(format: message, arguments: newArgs)
|
||||||
|
|
||||||
NSLog("\(logType) \(type): %@", messageFormat)
|
NSLog("\(logType) \(type): %@", messageFormat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
/// A marking protocol that says a type can be represented in a socket.io packet.
|
||||||
public protocol SocketData {}
|
public protocol SocketData {}
|
||||||
|
|
||||||
extension Array : SocketData {}
|
extension Array : SocketData {}
|
||||||
@ -39,7 +40,10 @@ extension NSString : SocketData {}
|
|||||||
extension NSNull : SocketData {}
|
extension NSNull : SocketData {}
|
||||||
extension String : SocketData {}
|
extension String : SocketData {}
|
||||||
|
|
||||||
|
/// A typealias for an ack callback.
|
||||||
public typealias AckCallback = ([Any]) -> Void
|
public typealias AckCallback = ([Any]) -> Void
|
||||||
|
|
||||||
|
/// A typealias for a normal callback.
|
||||||
public typealias NormalCallback = ([Any], SocketAckEmitter) -> Void
|
public typealias NormalCallback = ([Any], SocketAckEmitter) -> Void
|
||||||
|
|
||||||
typealias JSON = [String: Any]
|
typealias JSON = [String: Any]
|
||||||
|
|||||||
470
docs/Classes.html
Normal file
470
docs/Classes.html
Normal file
@ -0,0 +1,470 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Classes Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Classes Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Classes Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Classes</h1>
|
||||||
|
<p>The following classes are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO12SocketEngine"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SocketEngine" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO12SocketEngine">SocketEngine</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The class that handles the engine.io protocol and transports.
|
||||||
|
See <code><a href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a></code> and <code><a href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a></code> for transport specific methods.</p>
|
||||||
|
|
||||||
|
<a href="Classes/SocketEngine.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketEngine</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt">URLSessionDelegate</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO16SocketAckEmitter"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SocketAckEmitter" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO16SocketAckEmitter">SocketAckEmitter</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A class that represents a waiting ack call.</p>
|
||||||
|
|
||||||
|
<p><strong>NOTE</strong>: You should not store this beyond the life of the event handler.</p>
|
||||||
|
|
||||||
|
<a href="Classes/SocketAckEmitter.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketAckEmitter</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO13OnAckCallback"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/OnAckCallback" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO13OnAckCallback">OnAckCallback</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A class that represents an emit that will request an ack that has not yet been sent.
|
||||||
|
Call <code>timingOut(after:callback:)</code> to complete the emit
|
||||||
|
Example:</p>
|
||||||
|
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="nf">emitWithAck</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">)</span><span class="o">.</span><span class="nf">timingOut</span><span class="p">(</span><span class="nv">after</span><span class="p">:</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span> <span class="k">in</span>
|
||||||
|
<span class="o">...</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<a href="Classes/OnAckCallback.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">OnAckCallback</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO14SocketIOClient"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SocketIOClient" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO14SocketIOClient">SocketIOClient</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The main class for SocketIOClientSwift.</p>
|
||||||
|
|
||||||
|
<p>Represents a socket.io-client. Most interaction with socket.io will be through this class.</p>
|
||||||
|
|
||||||
|
<a href="Classes/SocketIOClient.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SocketIOClient</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt">SocketIOClientSpec</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">,</span> <span class="kt">SocketParsable</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO9WebSocket"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/WebSocket" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO9WebSocket">WebSocket</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Classes/WebSocket.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO7SSLCert"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SSLCert" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO7SSLCert">SSLCert</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Classes/SSLCert.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO11SSLSecurity"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO11SSLSecurity">SSLSecurity</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Classes/SSLSecurity.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO14SocketAnyEvent"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SocketAnyEvent" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO14SocketAnyEvent">SocketAnyEvent</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Represents some event that was received.</p>
|
||||||
|
|
||||||
|
<a href="Classes/SocketAnyEvent.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketAnyEvent</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:C8SocketIO19SocketClientManager"></a>
|
||||||
|
<a name="//apple_ref/swift/Class/SocketClientManager" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:C8SocketIO19SocketClientManager">SocketClientManager</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Experimental socket manager.</p>
|
||||||
|
|
||||||
|
<p>API subject to change.</p>
|
||||||
|
|
||||||
|
<p>Can be used to persist sockets across ViewControllers.</p>
|
||||||
|
|
||||||
|
<p>Sockets are strongly stored, so be sure to remove them once they are no
|
||||||
|
longer needed.</p>
|
||||||
|
|
||||||
|
<p>Example usage:</p>
|
||||||
|
<pre class="highlight plaintext"><code>let manager = SocketClientManager.sharedManager
|
||||||
|
manager["room1"] = socket1
|
||||||
|
manager["room2"] = socket2
|
||||||
|
manager.removeSocket(socket: socket2)
|
||||||
|
manager["room1"]?.emit("hello")
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<a href="Classes/SocketClientManager.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SocketClientManager</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
271
docs/Classes/OnAckCallback.html
Normal file
271
docs/Classes/OnAckCallback.html
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>OnAckCallback Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/OnAckCallback" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="OnAckCallback Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
OnAckCallback Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>OnAckCallback</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">OnAckCallback</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>A class that represents an emit that will request an ack that has not yet been sent.
|
||||||
|
Call <code>timingOut(after:callback:)</code> to complete the emit
|
||||||
|
Example:</p>
|
||||||
|
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="nf">emitWithAck</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">)</span><span class="o">.</span><span class="nf">timingOut</span><span class="p">(</span><span class="nv">after</span><span class="p">:</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span> <span class="k">in</span>
|
||||||
|
<span class="o">...</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods">
|
||||||
|
<h3 class="section-name">Methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO13OnAckCallback9timingOutFT5afterSi8callbackFGSaP__T__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/timingOut(after:callback:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO13OnAckCallback9timingOutFT5afterSi8callbackFGSaP__T__T_">timingOut(after:callback:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Completes an emitWithAck. If this isn’t called, the emit never happens.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">timingOut</span><span class="p">(</span><span class="n">after</span> <span class="nv">seconds</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="kt"><a href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a></span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>after</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The number of seconds before this emit times out if an ack hasn’t been received.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>callback</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The callback called when an ack is received, or when a timeout happens.
|
||||||
|
To check for timeout, use <code>SocketAckStatus</code>‘s <code>noAck</code> case.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
293
docs/Classes/SSLCert.html
Normal file
293
docs/Classes/SSLCert.html
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SSLCert Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/SSLCert" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SSLCert Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SSLCert Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SSLCert</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO7SSLCertcFT4dataV10Foundation4Data_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(data:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO7SSLCertcFT4dataV10Foundation4Data_S0_">init(data:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Designated init for certificates</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>data</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is the binary data of the certificate</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>a representation security object to be used with</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO7SSLCertcFT3keyCSo6SecKey_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(key:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO7SSLCertcFT3keyCSo6SecKey_S0_">init(key:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Designated init for public keys</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">SecKey</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>key</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is the public key to be used</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>a representation security object to be used with</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
386
docs/Classes/SSLSecurity.html
Normal file
386
docs/Classes/SSLSecurity.html
Normal file
@ -0,0 +1,386 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SSLSecurity Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SSLSecurity Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SSLSecurity Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SSLSecurity</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO11SSLSecurity11validatedDNSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/validatedDN" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO11SSLSecurity11validatedDNSb">validatedDN</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO11SSLSecuritycFT13usePublicKeysSb_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(usePublicKeys:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO11SSLSecuritycFT13usePublicKeysSb_S0_">init(usePublicKeys:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Use certs from main app bundle</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>usePublicKeys</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is to specific if the publicKeys or certificates should be used for SSL pinning validation</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>a representation security object to be used with</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO11SSLSecuritycFT5certsGSaCS_7SSLCert_13usePublicKeysSb_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(certs:usePublicKeys:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO11SSLSecuritycFT5certsGSaCS_7SSLCert_13usePublicKeysSb_S0_">init(certs:usePublicKeys:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Designated init</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">certs</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SSLCert.html">SSLCert</a></span><span class="p">],</span> <span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>certs</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is the certificates or public keys to use</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>usePublicKeys</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is to specific if the publicKeys or certificates should be used for SSL pinning validation</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>a representation security object to be used with</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO11SSLSecurity7isValidFTCSo8SecTrust6domainGSqSS__Sb"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/isValid(_:domain:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO11SSLSecurity7isValidFTCSo8SecTrust6domainGSqSS__Sb">isValid(_:domain:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Valid the trust and domain name.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">isValid</span><span class="p">(</span><span class="n">_</span> <span class="nv">trust</span><span class="p">:</span> <span class="kt">SecTrust</span><span class="p">,</span> <span class="nv">domain</span><span class="p">:</span> <span class="kt">String</span><span class="p">?)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>trust</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is the serverTrust to validate</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>domain</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>is the CN domain to validate</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>if the key was successfully validated</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
338
docs/Classes/SocketAckEmitter.html
Normal file
338
docs/Classes/SocketAckEmitter.html
Normal file
@ -0,0 +1,338 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketAckEmitter Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/SocketAckEmitter" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketAckEmitter Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketAckEmitter Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketAckEmitter</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketAckEmitter</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>A class that represents a waiting ack call.</p>
|
||||||
|
|
||||||
|
<p><strong>NOTE</strong>: You should not store this beyond the life of the event handler.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties">
|
||||||
|
<h3 class="section-name">Properties</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO16SocketAckEmitter8expectedSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/expected" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO16SocketAckEmitter8expectedSb">expected</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If true, this handler is expecting to be acked. Call <code>with(_: SocketData...)</code> to ack.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">expected</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods">
|
||||||
|
<h3 class="section-name">Methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO16SocketAckEmitter4withFtGSaPS_10SocketData___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO16SocketAckEmitter4withFtGSaPS_10SocketData___T_">with(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Call to ack receiving this event.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">with</span><span class="p">(</span><span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>items</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>A variable number of items to send when acking.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO16SocketAckEmitter4withFGSaP__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO16SocketAckEmitter4withFGSaP__T_">with(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Call to ack receiving this event.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">with</span><span class="p">(</span><span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>items</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>An array of items to send when acking. Use <code>[]</code> to send nothing.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
287
docs/Classes/SocketAnyEvent.html
Normal file
287
docs/Classes/SocketAnyEvent.html
Normal file
@ -0,0 +1,287 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketAnyEvent Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/SocketAnyEvent" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketAnyEvent Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketAnyEvent Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketAnyEvent</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketAnyEvent</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Represents some event that was received.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties">
|
||||||
|
<h3 class="section-name">Properties</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO14SocketAnyEvent5eventSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent5eventSS">event</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The event name.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO14SocketAnyEvent5itemsGSqGSaP___"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/items" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent5itemsGSqGSaP___">items</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The data items for this event.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO14SocketAnyEvent11descriptionSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent11descriptionSS">description</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The description of this event.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">override</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
475
docs/Classes/SocketClientManager.html
Normal file
475
docs/Classes/SocketClientManager.html
Normal file
@ -0,0 +1,475 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketClientManager Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/SocketClientManager" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketClientManager Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketClientManager Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketClientManager</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SocketClientManager</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Experimental socket manager.</p>
|
||||||
|
|
||||||
|
<p>API subject to change.</p>
|
||||||
|
|
||||||
|
<p>Can be used to persist sockets across ViewControllers.</p>
|
||||||
|
|
||||||
|
<p>Sockets are strongly stored, so be sure to remove them once they are no
|
||||||
|
longer needed.</p>
|
||||||
|
|
||||||
|
<p>Example usage:</p>
|
||||||
|
<pre class="highlight plaintext"><code>let manager = SocketClientManager.sharedManager
|
||||||
|
manager["room1"] = socket1
|
||||||
|
manager["room2"] = socket2
|
||||||
|
manager.removeSocket(socket: socket2)
|
||||||
|
manager["room1"]?.emit("hello")
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties."></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties." class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties.">
|
||||||
|
<h3 class="section-name">Properties.</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:iC8SocketIO19SocketClientManager9subscriptFSSGSqCS_14SocketIOClient_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:iC8SocketIO19SocketClientManager9subscriptFSSGSqCS_14SocketIOClient_">subscript(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Gets a socket by its name.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="nf">subscript</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>The socket, if one had the given name.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:ZvC8SocketIO19SocketClientManager13sharedManagerS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Variable/sharedManager" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:ZvC8SocketIO19SocketClientManager13sharedManagerS0_">sharedManager</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The shared manager.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">sharedManager</span> <span class="o">=</span> <span class="kt">SocketClientManager</span><span class="p">()</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods."></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods." class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods.">
|
||||||
|
<h3 class="section-name">Methods.</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO19SocketClientManager9addSocketFTCS_14SocketIOClient9labeledAsSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/addSocket(_:labeledAs:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO19SocketClientManager9addSocketFTCS_14SocketIOClient9labeledAsSS_T_">addSocket(_:labeledAs:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Adds a socket.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">addSocket</span><span class="p">(</span><span class="n">_</span> <span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">,</span> <span class="n">labeledAs</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>socket</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The socket to add.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>labeledAs</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The label for this socket.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO19SocketClientManager12removeSocketFT9withLabelSS_GSqCS_14SocketIOClient_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/removeSocket(withLabel:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO19SocketClientManager12removeSocketFT9withLabelSS_GSqCS_14SocketIOClient_">removeSocket(withLabel:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Removes a socket by a given name.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">removeSocket</span><span class="p">(</span><span class="n">withLabel</span> <span class="nv">label</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>withLabel</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The label of the socket to remove.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>The socket for the given label, if one was present.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO19SocketClientManager12removeSocketFCS_14SocketIOClientGSqS1__"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/removeSocket(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO19SocketClientManager12removeSocketFCS_14SocketIOClientGSqS1__">removeSocket(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Removes a socket.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">removeSocket</span><span class="p">(</span><span class="n">_</span> <span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>socket</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The socket to remove.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>The socket if it was in the manager.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO19SocketClientManager13removeSocketsFT_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/removeSockets()" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO19SocketClientManager13removeSocketsFT_T_">removeSockets()</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Removes all the sockets in the manager.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">removeSockets</span><span class="p">()</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
1466
docs/Classes/SocketEngine.html
Normal file
1466
docs/Classes/SocketEngine.html
Normal file
File diff suppressed because it is too large
Load Diff
1699
docs/Classes/SocketIOClient.html
Normal file
1699
docs/Classes/SocketIOClient.html
Normal file
File diff suppressed because it is too large
Load Diff
911
docs/Classes/WebSocket.html
Normal file
911
docs/Classes/WebSocket.html
Normal file
@ -0,0 +1,911 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>WebSocket Class Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Class/WebSocket" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="WebSocket Class Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
WebSocket Class Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>WebSocket</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:OC8SocketIO9WebSocket9CloseCode"></a>
|
||||||
|
<a name="//apple_ref/swift/Enum/CloseCode" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:OC8SocketIO9WebSocket9CloseCode">CloseCode</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="../Classes/WebSocket/CloseCode.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:ZvC8SocketIO9WebSocket11ErrorDomainSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Variable/ErrorDomain" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:ZvC8SocketIO9WebSocket11ErrorDomainSS">ErrorDomain</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket13callbackQueueCSo13DispatchQueue"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/callbackQueue" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket13callbackQueueCSo13DispatchQueue">callbackQueue</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Delegates"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Delegates" class="dashAnchor"></a>
|
||||||
|
<a href="#/Delegates">
|
||||||
|
<h3 class="section-name">Delegates</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket8delegateXwGSqPS_17WebSocketDelegate__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket8delegateXwGSqPS_17WebSocketDelegate__">delegate</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Responds to callback about new messages coming in over the WebSocket
|
||||||
|
and also connection/disconnect messages.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket12pongDelegateXwGSqPS_21WebSocketPongDelegate__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/pongDelegate" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket12pongDelegateXwGSqPS_21WebSocketPongDelegate__">pongDelegate</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Receives a callback for each pong message recived.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">pongDelegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Block%20based%20API."></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Block based API." class="dashAnchor"></a>
|
||||||
|
<a href="#/Block%20based%20API.">
|
||||||
|
<h3 class="section-name">Block based API.</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket9onConnectGSqFT_T__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/onConnect" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket9onConnectGSqFT_T__">onConnect</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket12onDisconnectGSqFGSqCSo7NSError_T__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/onDisconnect" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket12onDisconnectGSqFGSqCSo7NSError_T__">onDisconnect</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket6onTextGSqFSST__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/onText" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket6onTextGSqFSST__">onText</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket6onDataGSqFV10Foundation4DataT__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/onData" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket6onDataGSqFV10Foundation4DataT__">onData</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket6onPongGSqFGSqV10Foundation4Data_T__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/onPong" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket6onPongGSqFGSqV10Foundation4Data_T__">onPong</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket7headersGVs10DictionarySSSS_"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/headers" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket7headersGVs10DictionarySSSS_">headers</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket11voipEnabledSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/voipEnabled" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket11voipEnabledSb">voipEnabled</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket24disableSSLCertValidationSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/disableSSLCertValidation" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket24disableSSLCertValidationSb">disableSSLCertValidation</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket8securityGSqPS_17SSLTrustValidator__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/security" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket8securityGSqPS_17SSLTrustValidator__">security</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket22enabledSSLCipherSuitesGSqGSaVs6UInt32__"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/enabledSSLCipherSuites" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket22enabledSSLCipherSuitesGSqGSaVs6UInt32__">enabledSSLCipherSuites</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket6originGSqSS_"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/origin" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket6originGSqSS_">origin</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket7timeoutSi"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/timeout" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket7timeoutSi">timeout</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket11isConnectedSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/isConnected" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket11isConnectedSb">isConnected</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vC8SocketIO9WebSocket10currentURLV10Foundation3URL"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/currentURL" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vC8SocketIO9WebSocket10currentURLV10Foundation3URL">currentURL</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Private"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Private" class="dashAnchor"></a>
|
||||||
|
<a href="#/Private">
|
||||||
|
<h3 class="section-name">Private</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL9protocolsGSqGSaSS___S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(url:protocols:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL9protocolsGSqGSaSS___S0_">init(url:protocols:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Used for setting protocols.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">protocols</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL13writeQueueQOSOSC16QualityOfService9protocolsGSqGSaSS___S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(url:writeQueueQOS:protocols:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL13writeQueueQOSOSC16QualityOfService9protocolsGSqGSaSS___S0_">init(url:writeQueueQOS:protocols:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket7connectFT_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/connect()" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket7connectFT_T_">connect()</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Connect to the WebSocket server on a background thread.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket10disconnectFT12forceTimeoutGSqSd_9closeCodeVs6UInt16_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/disconnect(forceTimeout:closeCode:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket10disconnectFT12forceTimeoutGSqSd_9closeCodeVs6UInt16_T_">disconnect(forceTimeout:closeCode:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.
|
||||||
|
If you supply a non-nil <code>forceTimeout</code>, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.
|
||||||
|
If you supply a zero (or negative) <code>forceTimeout</code>, I immediately close the socket (without sending a Close control frame) and notify my delegate.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">disconnect</span><span class="p">(</span><span class="nv">forceTimeout</span><span class="p">:</span> <span class="kt">TimeInterval</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">closeCode</span><span class="p">:</span> <span class="kt">UInt16</span> <span class="o">=</span> <span class="kt"><a href="../Classes/WebSocket/CloseCode.html">CloseCode</a></span><span class="o">.</span><span class="n">normal</span><span class="o">.</span><span class="n">rawValue</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>forceTimeout</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Maximum time to wait for the server to close the socket.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>closeCode</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket5writeFT6stringSS10completionGSqFT_T___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/write(string:completion:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT6stringSS10completionGSqFT_T___T_">write(string:completion:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Write a string to the websocket. This sends it as a text frame.
|
||||||
|
If you supply a non-nil completion block, I will perform it when the write completes.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>string</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The string to write.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>completion</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The (optional) completion handler.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket5writeFT4dataV10Foundation4Data10completionGSqFT_T___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/write(data:completion:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT4dataV10Foundation4Data10completionGSqFT_T___T_">write(data:completion:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Write binary data to the websocket. This sends it as a binary frame.
|
||||||
|
If you supply a non-nil completion block, I will perform it when the write completes.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>data</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The data to write.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>completion</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The (optional) completion handler.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket5writeFT4pingV10Foundation4Data10completionGSqFT_T___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/write(ping:completion:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT4pingV10Foundation4Data10completionGSqFT_T___T_">write(ping:completion:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Write a ping to the websocket. This sends it as a control frame.
|
||||||
|
Yodel a sound to the planet. This sends it as an astroid. <a href="http://youtu.be/Eu5ZJELRiJ8?t=42s">http://youtu.be/Eu5ZJELRiJ8?t=42s</a></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">ping</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FC8SocketIO9WebSocket6streamFTCSo6Stream6handleVS1_5Event_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/stream(_:handle:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FC8SocketIO9WebSocket6streamFTCSo6Stream6handleVS1_5Event_T_">stream(_:handle:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Delegate for the stream methods. Processes incoming bytes</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">stream</span><span class="p">(</span><span class="n">_</span> <span class="nv">aStream</span><span class="p">:</span> <span class="kt">Stream</span><span class="p">,</span> <span class="n">handle</span> <span class="nv">eventCode</span><span class="p">:</span> <span class="kt">Stream</span><span class="o">.</span><span class="kt">Event</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
373
docs/Classes/WebSocket/CloseCode.html
Normal file
373
docs/Classes/WebSocket/CloseCode.html
Normal file
@ -0,0 +1,373 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>CloseCode Enum Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Enum/CloseCode" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="CloseCode Enum Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../../img/carat.png" />
|
||||||
|
CloseCode Enum Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>CloseCode</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode6normalFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/normal" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode6normalFMS1_S1_">normal</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode9goingAwayFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/goingAway" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode9goingAwayFMS1_S1_">goingAway</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode13protocolErrorFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/protocolError" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode13protocolErrorFMS1_S1_">protocolError</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode21protocolUnhandledTypeFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/protocolUnhandledType" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode21protocolUnhandledTypeFMS1_S1_">protocolUnhandledType</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode16noStatusReceivedFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/noStatusReceived" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode16noStatusReceivedFMS1_S1_">noStatusReceived</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode8encodingFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/encoding" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode8encodingFMS1_S1_">encoding</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode14policyViolatedFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/policyViolated" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode14policyViolatedFMS1_S1_">policyViolated</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FOC8SocketIO9WebSocket9CloseCode13messageTooBigFMS1_S1_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/messageTooBig" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode13messageTooBigFMS1_S1_">messageTooBig</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
316
docs/Enums.html
Normal file
316
docs/Enums.html
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Enums Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Enums Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Enums Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Enums</h1>
|
||||||
|
<p>The following enums are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:O8SocketIO20SocketIOClientStatus"></a>
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketIOClientStatus" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:O8SocketIO20SocketIOClientStatus">SocketIOClientStatus</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Represents the state of the client.</p>
|
||||||
|
|
||||||
|
<a href="Enums/SocketIOClientStatus.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientStatus</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:O8SocketIO15SocketAckStatus"></a>
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketAckStatus" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:O8SocketIO15SocketAckStatus">SocketAckStatus</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The status of an ack.</p>
|
||||||
|
|
||||||
|
<a href="Enums/SocketAckStatus.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketAckStatus</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:O8SocketIO22SocketEnginePacketType"></a>
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:O8SocketIO22SocketEnginePacketType">SocketEnginePacketType</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Represents the type of engine.io packet types.</p>
|
||||||
|
|
||||||
|
<a href="Enums/SocketEnginePacketType.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketEnginePacketType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:O8SocketIO20SocketIOClientOption"></a>
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketIOClientOption" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:O8SocketIO20SocketIOClientOption">SocketIOClientOption</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The options for a client.</p>
|
||||||
|
|
||||||
|
<a href="Enums/SocketIOClientOption.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientOption</span> <span class="p">:</span> <span class="kt">ClientOption</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
226
docs/Enums/SocketAckStatus.html
Normal file
226
docs/Enums/SocketAckStatus.html
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketAckStatus Enum Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketAckStatus" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketAckStatus Enum Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketAckStatus Enum Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketAckStatus</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketAckStatus</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>The status of an ack.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO15SocketAckStatus5noAckFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/noAck" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO15SocketAckStatus5noAckFMS0_S0_">noAck</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The ack timed out.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">noAck</span> <span class="o">=</span> <span class="s">"NO ACK"</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
412
docs/Enums/SocketEnginePacketType.html
Normal file
412
docs/Enums/SocketEnginePacketType.html
Normal file
@ -0,0 +1,412 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketEnginePacketType Enum Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketEnginePacketType Enum Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketEnginePacketType Enum Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketEnginePacketType</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketEnginePacketType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Represents the type of engine.io packet types.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType4openFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/open" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4openFMS0_S0_">open</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Open message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">open</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType5closeFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/close" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType5closeFMS0_S0_">close</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Close message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">close</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType4pingFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/ping" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4pingFMS0_S0_">ping</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Ping message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">ping</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType4pongFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/pong" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4pongFMS0_S0_">pong</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Pong message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">pong</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType7messageFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/message" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType7messageFMS0_S0_">message</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Regular message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">message</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType7upgradeFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/upgrade" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType7upgradeFMS0_S0_">upgrade</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Upgrade message.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">upgrade</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO22SocketEnginePacketType4noopFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/noop" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4noopFMS0_S0_">noop</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>NOOP.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">noop</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
932
docs/Enums/SocketIOClientOption.html
Normal file
932
docs/Enums/SocketIOClientOption.html
Normal file
@ -0,0 +1,932 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketIOClientOption Enum Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketIOClientOption" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketIOClientOption Enum Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketIOClientOption Enum Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketIOClientOption</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientOption</span> <span class="p">:</span> <span class="kt">ClientOption</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>The options for a client.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption13connectParamsFMS0_FGVs10DictionarySSP__S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/connectParams" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption13connectParamsFMS0_FGVs10DictionarySSP__S0_">connectParams</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A dictionary of GET parameters that will be included in the connect url.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">connectParams</span><span class="p">([</span><span class="kt">String</span><span class="p">:</span> <span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption7cookiesFMS0_FGSaCSo10HTTPCookie_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/cookies" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption7cookiesFMS0_FGSaCSo10HTTPCookie_S0_">cookies</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>An array of cookies that will be sent during the initial connection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">cookies</span><span class="p">([</span><span class="kt">HTTPCookie</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption16doubleEncodeUTF8FMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/doubleEncodeUTF8" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption16doubleEncodeUTF8FMS0_FSbS0_">doubleEncodeUTF8</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The node.js socket.io currently does funky things to unicode when doing HTTP long-polling. Passing <code>true</code> in
|
||||||
|
this option causes the client to try and fix any bad unicode that might be sent.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">doubleEncodeUTF8</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption12extraHeadersFMS0_FGVs10DictionarySSSS_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/extraHeaders" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption12extraHeadersFMS0_FGVs10DictionarySSSS_S0_">extraHeaders</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Any extra HTTP headers that should be sent during the initial connection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">extraHeaders</span><span class="p">([</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption8forceNewFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/forceNew" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption8forceNewFMS0_FSbS0_">forceNew</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>true</code>, will cause the client to always create a new engine. Useful for debugging,
|
||||||
|
or when you want to be sure no state from previous engines is being carried over.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">forceNew</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption12forcePollingFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/forcePolling" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption12forcePollingFMS0_FSbS0_">forcePolling</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>true</code>, the only transport that will be used will be HTTP long-polling.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">forcePolling</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption15forceWebsocketsFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/forceWebsockets" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption15forceWebsocketsFMS0_FSbS0_">forceWebsockets</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>true</code>, the only transport that will be used will be WebSockets.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">forceWebsockets</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption11handleQueueFMS0_FCSo13DispatchQueueS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/handleQueue" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption11handleQueueFMS0_FCSo13DispatchQueueS0_">handleQueue</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||||
|
called on.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">handleQueue</span><span class="p">(</span><span class="kt">DispatchQueue</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption3logFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/log" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption3logFMS0_FSbS0_">log</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>true</code>, the client will log debug information. This should be turned off in production code.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">log</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption6loggerFMS0_FPS_12SocketLogger_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/logger" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption6loggerFMS0_FPS_12SocketLogger_S0_">logger</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Used to pass in a custom logger.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">logger</span><span class="p">(</span><span class="kt"><a href="../Protocols/SocketLogger.html">SocketLogger</a></span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption3nspFMS0_FSSS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/nsp" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption3nspFMS0_FSSS0_">nsp</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The namespace that this client should connect to. Can be changed during use using the <code>joinNamespace</code>
|
||||||
|
and <code>leaveNamespace</code> methods on <code><a href="../Classes/SocketIOClient.html">SocketIOClient</a></code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">nsp</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption4pathFMS0_FSSS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/path" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption4pathFMS0_FSSS0_">path</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A custom path to socket.io. Only use this if the socket.io server is configured to look for this path.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">path</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption10reconnectsFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/reconnects" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption10reconnectsFMS0_FSbS0_">reconnects</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>false</code>, the client will not reconnect when it loses connection. Useful if you want full control
|
||||||
|
over when reconnects happen.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">reconnects</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption17reconnectAttemptsFMS0_FSiS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/reconnectAttempts" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption17reconnectAttemptsFMS0_FSiS0_">reconnectAttempts</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The number of times to try and reconnect before giving up. Pass <code>-1</code> to <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">never give up</a>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">reconnectAttempts</span><span class="p">(</span><span class="kt">Int</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption13reconnectWaitFMS0_FSiS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/reconnectWait" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption13reconnectWaitFMS0_FSiS0_">reconnectWait</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The number of seconds to wait before reconnect attempts.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">reconnectWait</span><span class="p">(</span><span class="kt">Int</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption6secureFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/secure" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption6secureFMS0_FSbS0_">secure</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Set <code>true</code> if your server is using secure transports.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">secure</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption8securityFMS0_FCS_11SSLSecurityS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/security" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption8securityFMS0_FCS_11SSLSecurityS0_">security</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Allows you to set which certs are valid. Useful for SSL pinning.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">security</span><span class="p">(</span><span class="kt"><a href="../Classes/SSLSecurity.html">SSLSecurity</a></span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption10selfSignedFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/selfSigned" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption10selfSignedFMS0_FSbS0_">selfSigned</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If you’re using a self-signed set. Only use for development.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">selfSigned</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption15sessionDelegateFMS0_FPSo18URLSessionDelegate_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/sessionDelegate" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption15sessionDelegateFMS0_FPSo18URLSessionDelegate_S0_">sessionDelegate</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">sessionDelegate</span><span class="p">(</span><span class="kt">URLSessionDelegate</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientOption11voipEnabledFMS0_FSbS0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/voipEnabled" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption11voipEnabledFMS0_FSbS0_">voipEnabled</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>If passed <code>true</code>, the WebSocket transport will try and use voip logic to keep network connections open in
|
||||||
|
the background. <strong>This option is experimental as socket.io shouldn’t be used for background communication.</strong></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="nf">voipEnabled</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties">
|
||||||
|
<h3 class="section-name">Properties</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vO8SocketIO20SocketIOClientOption11descriptionSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vO8SocketIO20SocketIOClientOption11descriptionSS">description</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The description of this option.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Operators"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Operators" class="dashAnchor"></a>
|
||||||
|
<a href="#/Operators">
|
||||||
|
<h3 class="section-name">Operators</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:ZFO8SocketIO20SocketIOClientOptionoi2eeFTS0_S0__Sb"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:ZFO8SocketIO20SocketIOClientOptionoi2eeFTS0_S0__Sb">==(_:_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Compares whether two options are the same.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="o">==</span><span class="p">(</span><span class="nv">lhs</span><span class="p">:</span> <span class="kt">SocketIOClientOption</span><span class="p">,</span> <span class="nv">rhs</span><span class="p">:</span> <span class="kt">SocketIOClientOption</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>lhs</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Left operand to compare.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>rhs</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Right operand to compare.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p><code>true</code> if the two are the same option.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
319
docs/Enums/SocketIOClientStatus.html
Normal file
319
docs/Enums/SocketIOClientStatus.html
Normal file
@ -0,0 +1,319 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketIOClientStatus Enum Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Enum/SocketIOClientStatus" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketIOClientStatus Enum Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketIOClientStatus Enum Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketIOClientStatus</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientStatus</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Represents the state of the client.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientStatus12notConnectedFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/notConnected" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus12notConnectedFMS0_S0_">notConnected</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The client has never been connected. Or the client has been reset.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">notConnected</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientStatus12disconnectedFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/disconnected" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus12disconnectedFMS0_S0_">disconnected</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The client was once connected, but not anymore.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">disconnected</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientStatus10connectingFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/connecting" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus10connectingFMS0_S0_">connecting</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The client is in the process of connecting.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">connecting</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FO8SocketIO20SocketIOClientStatus9connectedFMS0_S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Element/connected" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus9connectedFMS0_S0_">connected</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The client is currently connected.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">case</span> <span class="n">connected</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
249
docs/Global Variables.html
Normal file
249
docs/Global Variables.html
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Global Variables Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Global Variables Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Global Variables Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Global Variables</h1>
|
||||||
|
<p>The following global variables are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:v8SocketIO31WebsocketDidConnectNotificationSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Global/WebsocketDidConnectNotification" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:v8SocketIO34WebsocketDidDisconnectNotificationSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Global/WebsocketDidDisconnectNotification" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS"></a>
|
||||||
|
<a name="//apple_ref/swift/Global/WebsocketDisconnectionErrorKeyName" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
447
docs/Protocols.html
Normal file
447
docs/Protocols.html
Normal file
@ -0,0 +1,447 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Protocols Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Protocols Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Protocols Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Protocols</h1>
|
||||||
|
<p>The following protocols are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO21SocketEngineWebsocket"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEngineWebsocket" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO21SocketEngineWebsocket">SocketEngineWebsocket</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Protocol that is used to implement socket.io WebSocket support</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SocketEngineWebsocket.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO20SocketEnginePollable"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEnginePollable" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO20SocketEnginePollable">SocketEnginePollable</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Protocol that is used to implement socket.io polling support</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SocketEnginePollable.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEnginePollable</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO16SocketEngineSpec"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEngineSpec" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO16SocketEngineSpec">SocketEngineSpec</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Specifies a SocketEngine.</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SocketEngineSpec.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineSpec</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO10SocketData"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketData" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A marking protocol that says a type can be represented in a socket.io packet.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketData</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO12SocketLogger"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketLogger" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO12SocketLogger">SocketLogger</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Represents a class will log client events.</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SocketLogger.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketLogger</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO17WebSocketDelegate"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/WebSocketDelegate" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO17WebSocketDelegate">WebSocketDelegate</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Protocols/WebSocketDelegate.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO21WebSocketPongDelegate"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/WebSocketPongDelegate" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO21WebSocketPongDelegate">WebSocketPongDelegate</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Protocols/WebSocketPongDelegate.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO18SocketEngineClient"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEngineClient" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO18SocketEngineClient">SocketEngineClient</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Declares that a type will be a delegate to an engine.</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SocketEngineClient.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:P8SocketIO17SSLTrustValidator"></a>
|
||||||
|
<a name="//apple_ref/swift/Protocol/SSLTrustValidator" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:P8SocketIO17SSLTrustValidator">SSLTrustValidator</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
<a href="Protocols/SSLTrustValidator.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
212
docs/Protocols/SSLTrustValidator.html
Normal file
212
docs/Protocols/SSLTrustValidator.html
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SSLTrustValidator Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/SSLTrustValidator" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SSLTrustValidator Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SSLTrustValidator Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SSLTrustValidator</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO17SSLTrustValidator7isValidFTCSo8SecTrust6domainGSqSS__Sb"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/isValid(_:domain:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO17SSLTrustValidator7isValidFTCSo8SecTrust6domainGSqSS__Sb">isValid(_:domain:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
436
docs/Protocols/SocketEngineClient.html
Normal file
436
docs/Protocols/SocketEngineClient.html
Normal file
@ -0,0 +1,436 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketEngineClient Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEngineClient" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketEngineClient Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketEngineClient Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketEngineClient</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Declares that a type will be a delegate to an engine.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods">
|
||||||
|
<h3 class="section-name">Methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO18SocketEngineClient14engineDidErrorFT6reasonSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/engineDidError(reason:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient14engineDidErrorFT6reasonSS_T_">engineDidError(reason:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Called when the engine errors.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">engineDidError</span><span class="p">(</span><span class="nv">reason</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>reason</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The reason the engine errored.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO18SocketEngineClient14engineDidCloseFT6reasonSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/engineDidClose(reason:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient14engineDidCloseFT6reasonSS_T_">engineDidClose(reason:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Called when the engine closes.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">engineDidClose</span><span class="p">(</span><span class="nv">reason</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>reason</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The reason that the engine closed.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO18SocketEngineClient13engineDidOpenFT6reasonSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/engineDidOpen(reason:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient13engineDidOpenFT6reasonSS_T_">engineDidOpen(reason:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Called when the engine opens.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">engineDidOpen</span><span class="p">(</span><span class="nv">reason</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>reason</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The reason the engine opened.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO18SocketEngineClient18parseEngineMessageFSST_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/parseEngineMessage(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient18parseEngineMessageFSST_">parseEngineMessage(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Called when the engine has a message that must be parsed.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">parseEngineMessage</span><span class="p">(</span><span class="n">_</span> <span class="nv">msg</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>msg</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The message that needs parsing.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO18SocketEngineClient21parseEngineBinaryDataFV10Foundation4DataT_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/parseEngineBinaryData(_:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient21parseEngineBinaryDataFV10Foundation4DataT_">parseEngineBinaryData(_:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Called when the engine receives binary data.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">parseEngineBinaryData</span><span class="p">(</span><span class="n">_</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>data</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The data the engine received.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
499
docs/Protocols/SocketEnginePollable.html
Normal file
499
docs/Protocols/SocketEnginePollable.html
Normal file
@ -0,0 +1,499 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketEnginePollable Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEnginePollable" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketEnginePollable Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketEnginePollable Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketEnginePollable</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEnginePollable</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Protocol that is used to implement socket.io polling support</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO20SocketEnginePollable11invalidatedSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/invalidated" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable11invalidatedSb">invalidated</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>MARK: Properties
|
||||||
|
<code>true</code> If engine’s session has been invalidated.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">invalidated</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO20SocketEnginePollable8postWaitGSaSS_"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable8postWaitGSaSS_">postWait</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A queue of engine.io messages waiting for POSTing</p>
|
||||||
|
|
||||||
|
<p><strong>You should not touch this directly</strong></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">postWait</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO20SocketEnginePollable7sessionGSqCSo10URLSession_"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable7sessionGSqCSo10URLSession_">session</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The URLSession that will be used for polling.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">session</span><span class="p">:</span> <span class="kt">URLSession</span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO20SocketEnginePollable14waitingForPollSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/waitingForPoll" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable14waitingForPollSb">waitingForPoll</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p><code>true</code> if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to
|
||||||
|
disconnect us.</p>
|
||||||
|
|
||||||
|
<p><strong>Do not touch this directly</strong></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">waitingForPoll</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO20SocketEnginePollable14waitingForPostSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/waitingForPost" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable14waitingForPostSb">waitingForPost</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p><code>true</code> if there is an outstanding post. Trying to post before the first is done will cause socket.io to
|
||||||
|
disconnect us.</p>
|
||||||
|
|
||||||
|
<p><strong>Do not touch this directly</strong></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">waitingForPost</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO20SocketEnginePollable6doPollFT_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/doPoll()" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable6doPollFT_T_">doPoll()</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Call to send a long-polling request.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t need to call this directly, the engine should automatically maintain a long-poll request.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Call to send a long-polling request.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t need to call this directly, the engine should automatically maintain a long-poll request.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">doPoll</span><span class="p">()</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO20SocketEnginePollable15sendPollMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/sendPollMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable15sendPollMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">sendPollMessage(_:withType:withData:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Sends an engine.io message through the polling transport.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t call this directly, instead call the <code>write</code> method on <code><a href="../Classes/SocketEngine.html">SocketEngine</a></code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Sends an engine.io message through the polling transport.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t call this directly, instead call the <code>write</code> method on <code>SocketEngine</code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sendPollMessage</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">withType</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a></span><span class="p">,</span> <span class="n">withData</span> <span class="nv">datas</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>message</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The message to send.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>withType</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The type of message to send.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>withData</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The data associated with this message.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO20SocketEnginePollable11stopPollingFT_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/stopPolling()" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable11stopPollingFT_T_">stopPolling()</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Call to stop polling and invalidate the URLSession.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Call to stop polling and invalidate the URLSession.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">stopPolling</span><span class="p">()</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
1118
docs/Protocols/SocketEngineSpec.html
Normal file
1118
docs/Protocols/SocketEngineSpec.html
Normal file
File diff suppressed because it is too large
Load Diff
352
docs/Protocols/SocketEngineWebsocket.html
Normal file
352
docs/Protocols/SocketEngineWebsocket.html
Normal file
@ -0,0 +1,352 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketEngineWebsocket Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketEngineWebsocket" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketEngineWebsocket Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketEngineWebsocket Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketEngineWebsocket</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt"><a href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Protocol that is used to implement socket.io WebSocket support</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO21SocketEngineWebsocket20sendWebSocketMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/sendWebSocketMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO21SocketEngineWebsocket20sendWebSocketMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">sendWebSocketMessage(_:withType:withData:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Sends an engine.io message through the WebSocket transport.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t call this directly, instead call the <code>write</code> method on <code><a href="../Classes/SocketEngine.html">SocketEngine</a></code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Sends an engine.io message through the WebSocket transport.</p>
|
||||||
|
|
||||||
|
<p>You shouldn’t call this directly, instead call the <code>write</code> method on <code>SocketEngine</code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">sendWebSocketMessage</span><span class="p">(</span><span class="n">_</span> <span class="nv">str</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">withType</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a></span><span class="p">,</span> <span class="n">withData</span> <span class="nv">datas</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>message</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The message to send.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>withType</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The type of message to send.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>withData</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The data associated with this message.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Starscream%20delegate%20methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Starscream delegate methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Starscream%20delegate%20methods">
|
||||||
|
<h3 class="section-name">Starscream delegate methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FE8SocketIOPS_21SocketEngineWebsocket26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidReceiveMessage(socket:text:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FE8SocketIOPS_21SocketEngineWebsocket26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_">websocketDidReceiveMessage(socket:text:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Extension method
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Delegate method for when a message is received.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveMessage</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">,</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FE8SocketIOPS_21SocketEngineWebsocket23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidReceiveData(socket:data:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FE8SocketIOPS_21SocketEngineWebsocket23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_">websocketDidReceiveData(socket:data:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Extension method
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Delegate method for when binary is received.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveData</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
400
docs/Protocols/SocketLogger.html
Normal file
400
docs/Protocols/SocketLogger.html
Normal file
@ -0,0 +1,400 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketLogger Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/SocketLogger" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketLogger Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketLogger Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketLogger</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketLogger</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>Represents a class will log client events.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties">
|
||||||
|
<h3 class="section-name">Properties</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vP8SocketIO12SocketLogger3logSb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/log" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vP8SocketIO12SocketLogger3logSb">log</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Whether to log or not</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="k">var</span> <span class="nv">log</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods">
|
||||||
|
<h3 class="section-name">Methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO12SocketLogger3logFtSS4typeSS4argsGSaP___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/log(_:type:args:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO12SocketLogger3logFtSS4typeSS4argsGSaP___T_">log(_:type:args:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Normal log messages</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Default implementation.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">log</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">args</span><span class="p">:</span> <span class="kt">Any</span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>message</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The message being logged. Can include <code>%@</code> that will be replaced with <code>args</code></p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>type</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The type of entity that called for logging.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>args</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Any args that should be inserted into the message. May be left out.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO12SocketLogger5errorFtSS4typeSS4argsGSaP___T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/error(_:type:args:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO12SocketLogger5errorFtSS4typeSS4argsGSaP___T_">error(_:type:args:)</a>
|
||||||
|
</code>
|
||||||
|
<span class="declaration-note">
|
||||||
|
Default implementation
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Error Messages</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<h4>Default Implementation</h4>
|
||||||
|
<div class="default_impl abstract">
|
||||||
|
<p>Default implementation.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">error</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">args</span><span class="p">:</span> <span class="kt">Any</span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>message</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The message being logged. Can include <code>%@</code> that will be replaced with <code>args</code></p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>type</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The type of entity that called for logging.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>args</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Any args that should be inserted into the message. May be left out.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
269
docs/Protocols/WebSocketDelegate.html
Normal file
269
docs/Protocols/WebSocketDelegate.html
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>WebSocketDelegate Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/WebSocketDelegate" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="WebSocketDelegate Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
WebSocketDelegate Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>WebSocketDelegate</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO17WebSocketDelegate19websocketDidConnectFT6socketCS_9WebSocket_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidConnect(socket:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate19websocketDidConnectFT6socketCS_9WebSocket_T_">websocketDidConnect(socket:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO17WebSocketDelegate22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidDisconnect(socket:error:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_">websocketDidDisconnect(socket:error:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO17WebSocketDelegate26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidReceiveMessage(socket:text:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_">websocketDidReceiveMessage(socket:text:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO17WebSocketDelegate23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidReceiveData(socket:data:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_">websocketDidReceiveData(socket:data:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
212
docs/Protocols/WebSocketPongDelegate.html
Normal file
212
docs/Protocols/WebSocketPongDelegate.html
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>WebSocketPongDelegate Protocol Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Protocol/WebSocketPongDelegate" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="WebSocketPongDelegate Protocol Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
WebSocketPongDelegate Protocol Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>WebSocketPongDelegate</h1>
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FP8SocketIO21WebSocketPongDelegate23websocketDidReceivePongFT6socketCS_9WebSocket4dataGSqV10Foundation4Data__T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/websocketDidReceivePong(socket:data:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FP8SocketIO21WebSocketPongDelegate23websocketDidReceivePongFT6socketCS_9WebSocket4dataGSqV10Foundation4Data__T_">websocketDidReceivePong(socket:data:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Undocumented</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
220
docs/Structs.html
Normal file
220
docs/Structs.html
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Structs Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Structs Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Structs Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Structs</h1>
|
||||||
|
<p>The following structs are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:V8SocketIO27SocketIOClientConfiguration"></a>
|
||||||
|
<a name="//apple_ref/swift/Struct/SocketIOClientConfiguration" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration">SocketIOClientConfiguration</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>An array-like type that holds <code><a href="Enums/SocketIOClientOption.html">SocketIOClientOption</a></code>s</p>
|
||||||
|
|
||||||
|
<a href="Structs/SocketIOClientConfiguration.html" class="slightly-smaller">See more</a>
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketIOClientConfiguration</span> <span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span><span class="p">,</span> <span class="kt">Collection</span><span class="p">,</span> <span class="kt">MutableCollection</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
647
docs/Structs/SocketIOClientConfiguration.html
Normal file
647
docs/Structs/SocketIOClientConfiguration.html
Normal file
@ -0,0 +1,647 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketIOClientConfiguration Struct Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="../js/jquery.min.js" defer></script>
|
||||||
|
<script src="../js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="../js/lunr.min.js" defer></script>
|
||||||
|
<script src="../js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="../js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<a name="//apple_ref/swift/Struct/SocketIOClientConfiguration" class="dashAnchor"></a>
|
||||||
|
|
||||||
|
<a title="SocketIOClientConfiguration Struct Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="../index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="../search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="../img/carat.png" />
|
||||||
|
SocketIOClientConfiguration Struct Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>SocketIOClientConfiguration</h1>
|
||||||
|
<div class="declaration">
|
||||||
|
<div class="language">
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketIOClientConfiguration</span> <span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span><span class="p">,</span> <span class="kt">Collection</span><span class="p">,</span> <span class="kt">MutableCollection</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p>An array-like type that holds <code><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></code>s</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Typealiases"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Typealiases" class="dashAnchor"></a>
|
||||||
|
<a href="#/Typealiases">
|
||||||
|
<h3 class="section-name">Typealiases</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:V8SocketIO27SocketIOClientConfiguration8Iterator"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/Iterator" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration8Iterator">Iterator</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Iterator type.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Iterator</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">Iterator</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:V8SocketIO27SocketIOClientConfiguration7Element"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/Element" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Type of element stored.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Element</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:V8SocketIO27SocketIOClientConfiguration11SubSequence"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/SubSequence" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration11SubSequence">SubSequence</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>SubSequence type.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">SubSequence</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">SubSequence</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:V8SocketIO27SocketIOClientConfiguration5Index"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/Index" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Index type.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Index</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">Index</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Properties"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||||
|
<a href="#/Properties">
|
||||||
|
<h3 class="section-name">Properties</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vV8SocketIO27SocketIOClientConfiguration10startIndexSi"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/startIndex" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration10startIndexSi">startIndex</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The start index of this collection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">startIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vV8SocketIO27SocketIOClientConfiguration8endIndexSi"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/endIndex" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration8endIndexSi">endIndex</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The end index of this collection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">endIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vV8SocketIO27SocketIOClientConfiguration7isEmptySb"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/isEmpty" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration7isEmptySb">isEmpty</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Whether this collection is empty.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isEmpty</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vV8SocketIO27SocketIOClientConfiguration5countSi"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/count" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration5countSi">count</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The number of elements stored in this collection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">count</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span><span class="o">.</span><span class="kt">Stride</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:vV8SocketIO27SocketIOClientConfiguration5firstGSqOS_20SocketIOClientOption_"></a>
|
||||||
|
<a name="//apple_ref/swift/Property/first" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration5firstGSqOS_20SocketIOClientOption_">first</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>The first element in this collection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">first</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="p">?</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Initializers"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Initializers" class="dashAnchor"></a>
|
||||||
|
<a href="#/Initializers">
|
||||||
|
<h3 class="section-name">Initializers</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FV8SocketIO27SocketIOClientConfigurationcFt12arrayLiteralGSaOS_20SocketIOClientOption__S0_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfigurationcFt12arrayLiteralGSaOS_20SocketIOClientOption__S0_">init(arrayLiteral:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Creates a new <code>SocketIOClientConfiguration</code> from an array literal.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">arrayLiteral</span> <span class="nv">elements</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>arrayLiteral</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The elements.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="task-group">
|
||||||
|
<div class="task-name-container">
|
||||||
|
<a name="/Methods"></a>
|
||||||
|
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||||
|
<a href="#/Methods">
|
||||||
|
<h3 class="section-name">Methods</h3>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FV8SocketIO27SocketIOClientConfiguration12makeIteratorFT_GVs16IndexingIteratorGSaOS_20SocketIOClientOption__"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/makeIterator()" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration12makeIteratorFT_GVs16IndexingIteratorGSaOS_20SocketIOClientOption__">makeIterator()</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Creates an iterator for this collection.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">makeIterator</span><span class="p">()</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration8Iterator">Iterator</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>An iterator over this collection.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FV8SocketIO27SocketIOClientConfiguration5indexFT5afterSi_Si"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/index(after:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration5indexFT5afterSi_Si">index(after:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">index</span><span class="p">(</span><span class="n">after</span> <span class="nv">i</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Return Value</h4>
|
||||||
|
<p>The index after index.</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:FV8SocketIO27SocketIOClientConfiguration6insertFTOS_20SocketIOClientOption9replacingSb_T_"></a>
|
||||||
|
<a name="//apple_ref/swift/Method/insert(_:replacing:)" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration6insertFTOS_20SocketIOClientOption9replacingSb_T_">insert(_:replacing:)</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>Special method that inserts <code>element</code> into the collection, replacing any other instances of <code>element</code>.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">insert</span><span class="p">(</span><span class="n">_</span> <span class="nv">element</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="p">,</span> <span class="n">replacing</span> <span class="nv">replace</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h4>Parameters</h4>
|
||||||
|
<table class="graybox">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>element</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>The element to insert.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>
|
||||||
|
<em>replacing</em>
|
||||||
|
</code>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<p>Whether to replace any occurrences of element to the new item. Default is <code>true</code>.</p>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
246
docs/Typealiases.html
Normal file
246
docs/Typealiases.html
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Typealiases Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="Typealiases Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
Typealiases Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<h1>Typealiases</h1>
|
||||||
|
<p>The following typealiases are available globally.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="task-group">
|
||||||
|
<ul class="item-container">
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:8SocketIO14NormalCallback"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/NormalCallback" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A typealias for a normal callback.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">NormalCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">],</span> <span class="kt"><a href="Classes/SocketAckEmitter.html">SocketAckEmitter</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<div>
|
||||||
|
<code>
|
||||||
|
<a name="/s:8SocketIO11AckCallback"></a>
|
||||||
|
<a name="//apple_ref/swift/Alias/AckCallback" class="dashAnchor"></a>
|
||||||
|
<a class="token" href="#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</code>
|
||||||
|
</div>
|
||||||
|
<div class="height-container">
|
||||||
|
<div class="pointer-container"></div>
|
||||||
|
<section class="section">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="abstract">
|
||||||
|
<p>A typealias for an ack callback.</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="declaration">
|
||||||
|
<h4>Declaration</h4>
|
||||||
|
<div class="language">
|
||||||
|
<p class="aside-title">Swift</p>
|
||||||
|
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">AckCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="kt">Void</span></code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
1
docs/badge.svg
Normal file
1
docs/badge.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="128" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h93v20H0z"/><path fill="#a4a61d" d="M93 0h35v20H93z"/><path fill="url(#b)" d="M0 0h128v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="46.5" y="15" fill="#010101" fill-opacity=".3">documentation</text><text x="46.5" y="14">documentation</text><text x="109.5" y="15" fill="#010101" fill-opacity=".3">84%</text><text x="109.5" y="14">84%</text></g></svg>
|
||||||
|
After Width: | Height: | Size: 808 B |
200
docs/css/highlight.css
Normal file
200
docs/css/highlight.css
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
/* Credit to https://gist.github.com/wataru420/2048287 */
|
||||||
|
.highlight {
|
||||||
|
/* Comment */
|
||||||
|
/* Error */
|
||||||
|
/* Keyword */
|
||||||
|
/* Operator */
|
||||||
|
/* Comment.Multiline */
|
||||||
|
/* Comment.Preproc */
|
||||||
|
/* Comment.Single */
|
||||||
|
/* Comment.Special */
|
||||||
|
/* Generic.Deleted */
|
||||||
|
/* Generic.Deleted.Specific */
|
||||||
|
/* Generic.Emph */
|
||||||
|
/* Generic.Error */
|
||||||
|
/* Generic.Heading */
|
||||||
|
/* Generic.Inserted */
|
||||||
|
/* Generic.Inserted.Specific */
|
||||||
|
/* Generic.Output */
|
||||||
|
/* Generic.Prompt */
|
||||||
|
/* Generic.Strong */
|
||||||
|
/* Generic.Subheading */
|
||||||
|
/* Generic.Traceback */
|
||||||
|
/* Keyword.Constant */
|
||||||
|
/* Keyword.Declaration */
|
||||||
|
/* Keyword.Pseudo */
|
||||||
|
/* Keyword.Reserved */
|
||||||
|
/* Keyword.Type */
|
||||||
|
/* Literal.Number */
|
||||||
|
/* Literal.String */
|
||||||
|
/* Name.Attribute */
|
||||||
|
/* Name.Builtin */
|
||||||
|
/* Name.Class */
|
||||||
|
/* Name.Constant */
|
||||||
|
/* Name.Entity */
|
||||||
|
/* Name.Exception */
|
||||||
|
/* Name.Function */
|
||||||
|
/* Name.Namespace */
|
||||||
|
/* Name.Tag */
|
||||||
|
/* Name.Variable */
|
||||||
|
/* Operator.Word */
|
||||||
|
/* Text.Whitespace */
|
||||||
|
/* Literal.Number.Float */
|
||||||
|
/* Literal.Number.Hex */
|
||||||
|
/* Literal.Number.Integer */
|
||||||
|
/* Literal.Number.Oct */
|
||||||
|
/* Literal.String.Backtick */
|
||||||
|
/* Literal.String.Char */
|
||||||
|
/* Literal.String.Doc */
|
||||||
|
/* Literal.String.Double */
|
||||||
|
/* Literal.String.Escape */
|
||||||
|
/* Literal.String.Heredoc */
|
||||||
|
/* Literal.String.Interpol */
|
||||||
|
/* Literal.String.Other */
|
||||||
|
/* Literal.String.Regex */
|
||||||
|
/* Literal.String.Single */
|
||||||
|
/* Literal.String.Symbol */
|
||||||
|
/* Name.Builtin.Pseudo */
|
||||||
|
/* Name.Variable.Class */
|
||||||
|
/* Name.Variable.Global */
|
||||||
|
/* Name.Variable.Instance */
|
||||||
|
/* Literal.Number.Integer.Long */ }
|
||||||
|
.highlight .c {
|
||||||
|
color: #999988;
|
||||||
|
font-style: italic; }
|
||||||
|
.highlight .err {
|
||||||
|
color: #a61717;
|
||||||
|
background-color: #e3d2d2; }
|
||||||
|
.highlight .k {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .o {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .cm {
|
||||||
|
color: #999988;
|
||||||
|
font-style: italic; }
|
||||||
|
.highlight .cp {
|
||||||
|
color: #999999;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .c1 {
|
||||||
|
color: #999988;
|
||||||
|
font-style: italic; }
|
||||||
|
.highlight .cs {
|
||||||
|
color: #999999;
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: italic; }
|
||||||
|
.highlight .gd {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #ffdddd; }
|
||||||
|
.highlight .gd .x {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #ffaaaa; }
|
||||||
|
.highlight .ge {
|
||||||
|
color: #000000;
|
||||||
|
font-style: italic; }
|
||||||
|
.highlight .gr {
|
||||||
|
color: #aa0000; }
|
||||||
|
.highlight .gh {
|
||||||
|
color: #999999; }
|
||||||
|
.highlight .gi {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #ddffdd; }
|
||||||
|
.highlight .gi .x {
|
||||||
|
color: #000000;
|
||||||
|
background-color: #aaffaa; }
|
||||||
|
.highlight .go {
|
||||||
|
color: #888888; }
|
||||||
|
.highlight .gp {
|
||||||
|
color: #555555; }
|
||||||
|
.highlight .gs {
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .gu {
|
||||||
|
color: #aaaaaa; }
|
||||||
|
.highlight .gt {
|
||||||
|
color: #aa0000; }
|
||||||
|
.highlight .kc {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .kd {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .kp {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .kr {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .kt {
|
||||||
|
color: #445588; }
|
||||||
|
.highlight .m {
|
||||||
|
color: #009999; }
|
||||||
|
.highlight .s {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .na {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .nb {
|
||||||
|
color: #0086B3; }
|
||||||
|
.highlight .nc {
|
||||||
|
color: #445588;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .no {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .ni {
|
||||||
|
color: #800080; }
|
||||||
|
.highlight .ne {
|
||||||
|
color: #990000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .nf {
|
||||||
|
color: #990000; }
|
||||||
|
.highlight .nn {
|
||||||
|
color: #555555; }
|
||||||
|
.highlight .nt {
|
||||||
|
color: #000080; }
|
||||||
|
.highlight .nv {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .ow {
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold; }
|
||||||
|
.highlight .w {
|
||||||
|
color: #bbbbbb; }
|
||||||
|
.highlight .mf {
|
||||||
|
color: #009999; }
|
||||||
|
.highlight .mh {
|
||||||
|
color: #009999; }
|
||||||
|
.highlight .mi {
|
||||||
|
color: #009999; }
|
||||||
|
.highlight .mo {
|
||||||
|
color: #009999; }
|
||||||
|
.highlight .sb {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .sc {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .sd {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .s2 {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .se {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .sh {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .si {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .sx {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .sr {
|
||||||
|
color: #009926; }
|
||||||
|
.highlight .s1 {
|
||||||
|
color: #d14; }
|
||||||
|
.highlight .ss {
|
||||||
|
color: #990073; }
|
||||||
|
.highlight .bp {
|
||||||
|
color: #999999; }
|
||||||
|
.highlight .vc {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .vg {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .vi {
|
||||||
|
color: #008080; }
|
||||||
|
.highlight .il {
|
||||||
|
color: #009999; }
|
||||||
368
docs/css/jazzy.css
Normal file
368
docs/css/jazzy.css
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
*, *:before, *:after {
|
||||||
|
box-sizing: inherit; }
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
background: #fff;
|
||||||
|
color: #333;
|
||||||
|
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
letter-spacing: .2px;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
box-sizing: border-box; }
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1.275em 0 0.6em; }
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1.275em 0 0.3em; }
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1em 0 0.3em; }
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1.275em 0 0.85em; }
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1.275em 0 0.85em; }
|
||||||
|
|
||||||
|
h6 {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
margin: 1.275em 0 0.85em;
|
||||||
|
color: #777; }
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0 0 1em; }
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
padding: 0 0 0 2em;
|
||||||
|
margin: 0 0 0.85em; }
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
margin: 0 0 0.85em;
|
||||||
|
padding: 0 15px;
|
||||||
|
color: #858585;
|
||||||
|
border-left: 4px solid #e5e5e5; }
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%; }
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #4183c4;
|
||||||
|
text-decoration: none; }
|
||||||
|
a:hover, a:focus {
|
||||||
|
outline: 0;
|
||||||
|
text-decoration: underline; }
|
||||||
|
|
||||||
|
table {
|
||||||
|
background: #fff;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 0 0 0.85em; }
|
||||||
|
|
||||||
|
tr:nth-child(2n) {
|
||||||
|
background-color: #fbfbfb; }
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 6px 13px;
|
||||||
|
border: 1px solid #ddd; }
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin: 0 0 1.275em;
|
||||||
|
padding: .85em 1em;
|
||||||
|
overflow: auto;
|
||||||
|
background: #f7f7f7;
|
||||||
|
font-size: .85em;
|
||||||
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
|
||||||
|
|
||||||
|
p > code, li > code {
|
||||||
|
background: #f7f7f7;
|
||||||
|
padding: .2em; }
|
||||||
|
p > code:before, p > code:after, li > code:before, li > code:after {
|
||||||
|
letter-spacing: -.2em;
|
||||||
|
content: "\00a0"; }
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
padding: 0;
|
||||||
|
white-space: pre; }
|
||||||
|
|
||||||
|
.content-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column; }
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.content-wrapper {
|
||||||
|
flex-direction: row; } }
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 0.875em;
|
||||||
|
background: #444;
|
||||||
|
color: #999; }
|
||||||
|
|
||||||
|
.header-col {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 8px; }
|
||||||
|
|
||||||
|
.header-col--primary {
|
||||||
|
flex: 1; }
|
||||||
|
|
||||||
|
.header-link {
|
||||||
|
color: #fff; }
|
||||||
|
|
||||||
|
.header-icon {
|
||||||
|
padding-right: 6px;
|
||||||
|
vertical-align: -4px;
|
||||||
|
height: 16px; }
|
||||||
|
|
||||||
|
.breadcrumbs {
|
||||||
|
font-size: 0.875em;
|
||||||
|
padding: 8px 16px;
|
||||||
|
margin: 0;
|
||||||
|
background: #fbfbfb;
|
||||||
|
border-bottom: 1px solid #ddd; }
|
||||||
|
|
||||||
|
.carat {
|
||||||
|
height: 10px;
|
||||||
|
margin: 0 5px; }
|
||||||
|
|
||||||
|
.navigation {
|
||||||
|
order: 2; }
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.navigation {
|
||||||
|
order: 1;
|
||||||
|
width: 25%;
|
||||||
|
max-width: 300px;
|
||||||
|
padding-bottom: 64px;
|
||||||
|
overflow: hidden;
|
||||||
|
word-wrap: normal;
|
||||||
|
background: #fbfbfb;
|
||||||
|
border-right: 1px solid #ddd; } }
|
||||||
|
|
||||||
|
.nav-groups {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 0; }
|
||||||
|
|
||||||
|
.nav-group-name {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
padding: 8px 0 8px 16px; }
|
||||||
|
|
||||||
|
.nav-group-name-link {
|
||||||
|
color: #333; }
|
||||||
|
|
||||||
|
.nav-group-tasks {
|
||||||
|
margin: 8px 0;
|
||||||
|
padding: 0 0 0 8px; }
|
||||||
|
|
||||||
|
.nav-group-task {
|
||||||
|
font-size: 1em;
|
||||||
|
list-style-type: none;
|
||||||
|
white-space: nowrap; }
|
||||||
|
|
||||||
|
.nav-group-task-link {
|
||||||
|
color: #808080; }
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
order: 1; }
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.main-content {
|
||||||
|
order: 2;
|
||||||
|
flex: 1;
|
||||||
|
padding-bottom: 60px; } }
|
||||||
|
|
||||||
|
.section {
|
||||||
|
padding: 0 32px;
|
||||||
|
border-bottom: 1px solid #ddd; }
|
||||||
|
|
||||||
|
.section-content {
|
||||||
|
max-width: 834px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 16px 0; }
|
||||||
|
|
||||||
|
.section-name {
|
||||||
|
color: #666;
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
.declaration .highlight {
|
||||||
|
overflow-x: initial;
|
||||||
|
padding: 8px 0;
|
||||||
|
margin: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none; }
|
||||||
|
|
||||||
|
.task-group-section {
|
||||||
|
border-top: 1px solid #ddd; }
|
||||||
|
|
||||||
|
.task-group {
|
||||||
|
padding-top: 0px; }
|
||||||
|
|
||||||
|
.task-name-container a[name]:before {
|
||||||
|
content: "";
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
.item-container {
|
||||||
|
padding: 0; }
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding-top: 8px;
|
||||||
|
width: 100%;
|
||||||
|
list-style-type: none; }
|
||||||
|
.item a[name]:before {
|
||||||
|
content: "";
|
||||||
|
display: block; }
|
||||||
|
.item .token {
|
||||||
|
padding-left: 3px;
|
||||||
|
margin-left: 0px;
|
||||||
|
font-size: 1rem; }
|
||||||
|
.item .declaration-note {
|
||||||
|
font-size: .85em;
|
||||||
|
color: #808080;
|
||||||
|
font-style: italic; }
|
||||||
|
|
||||||
|
.pointer-container {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
left: -23px;
|
||||||
|
padding-bottom: 13px;
|
||||||
|
position: relative;
|
||||||
|
width: 110%; }
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
left: 21px;
|
||||||
|
top: 7px;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
border-left: 1px solid #ddd;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
background: #fff;
|
||||||
|
transform: rotate(45deg); }
|
||||||
|
|
||||||
|
.height-container {
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden; }
|
||||||
|
.height-container .section {
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-top-width: 0;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
padding: 8px 16px; }
|
||||||
|
|
||||||
|
.aside, .language {
|
||||||
|
padding: 6px 12px;
|
||||||
|
margin: 12px 0;
|
||||||
|
border-left: 5px solid #dddddd;
|
||||||
|
overflow-y: hidden; }
|
||||||
|
.aside .aside-title, .language .aside-title {
|
||||||
|
font-size: 9px;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin: 0;
|
||||||
|
color: #aaa;
|
||||||
|
-webkit-user-select: none; }
|
||||||
|
.aside p:last-child, .language p:last-child {
|
||||||
|
margin-bottom: 0; }
|
||||||
|
|
||||||
|
.language {
|
||||||
|
border-left: 5px solid #cde9f4; }
|
||||||
|
.language .aside-title {
|
||||||
|
color: #4183c4; }
|
||||||
|
|
||||||
|
.aside-warning {
|
||||||
|
border-left: 5px solid #ff6666; }
|
||||||
|
.aside-warning .aside-title {
|
||||||
|
color: #ff0000; }
|
||||||
|
|
||||||
|
.graybox {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%; }
|
||||||
|
.graybox p {
|
||||||
|
margin: 0;
|
||||||
|
word-break: break-word;
|
||||||
|
min-width: 50px; }
|
||||||
|
.graybox td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 5px 25px 5px 10px;
|
||||||
|
vertical-align: middle; }
|
||||||
|
.graybox tr td:first-of-type {
|
||||||
|
text-align: right;
|
||||||
|
padding: 7px;
|
||||||
|
vertical-align: top;
|
||||||
|
word-break: normal;
|
||||||
|
width: 40px; }
|
||||||
|
|
||||||
|
.slightly-smaller {
|
||||||
|
font-size: 0.9em; }
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
padding: 8px 16px;
|
||||||
|
background: #444;
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 0.8em; }
|
||||||
|
.footer p {
|
||||||
|
margin: 8px 0; }
|
||||||
|
.footer a {
|
||||||
|
color: #fff; }
|
||||||
|
|
||||||
|
html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
|
||||||
|
display: none; }
|
||||||
|
html.dash .height-container {
|
||||||
|
display: block; }
|
||||||
|
|
||||||
|
form[role=search] input {
|
||||||
|
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 0;
|
||||||
|
border: none;
|
||||||
|
border-radius: 1em; }
|
||||||
|
.loading form[role=search] input {
|
||||||
|
background: white url(../img/spinner.gif) center right 4px no-repeat; }
|
||||||
|
form[role=search] .tt-menu {
|
||||||
|
margin: 0;
|
||||||
|
min-width: 300px;
|
||||||
|
background: #fbfbfb;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #ddd; }
|
||||||
|
form[role=search] .tt-highlight {
|
||||||
|
font-weight: bold; }
|
||||||
|
form[role=search] .tt-suggestion {
|
||||||
|
font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
padding: 0 8px; }
|
||||||
|
form[role=search] .tt-suggestion span {
|
||||||
|
display: table-cell;
|
||||||
|
white-space: nowrap; }
|
||||||
|
form[role=search] .tt-suggestion .doc-parent-name {
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 0.9em;
|
||||||
|
padding-left: 16px; }
|
||||||
|
form[role=search] .tt-suggestion:hover,
|
||||||
|
form[role=search] .tt-suggestion.tt-cursor {
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #4183c4;
|
||||||
|
color: #fff; }
|
||||||
|
form[role=search] .tt-suggestion:hover .doc-parent-name,
|
||||||
|
form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
|
||||||
|
color: #fff; }
|
||||||
BIN
docs/img/carat.png
Executable file
BIN
docs/img/carat.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 274 B |
BIN
docs/img/dash.png
Executable file
BIN
docs/img/dash.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
docs/img/gh.png
Executable file
BIN
docs/img/gh.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/img/spinner.gif
Normal file
BIN
docs/img/spinner.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
376
docs/index.html
Normal file
376
docs/index.html
Normal file
@ -0,0 +1,376 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>SocketIO Reference</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="js/jquery.min.js" defer></script>
|
||||||
|
<script src="js/jazzy.js" defer></script>
|
||||||
|
|
||||||
|
<script src="js/lunr.min.js" defer></script>
|
||||||
|
<script src="js/typeahead.jquery.js" defer></script>
|
||||||
|
<script src="js/jazzy.search.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<a title="SocketIO Reference"></a>
|
||||||
|
|
||||||
|
<header class="header">
|
||||||
|
<p class="header-col header-col--primary">
|
||||||
|
<a class="header-link" href="index.html">
|
||||||
|
SocketIO Docs
|
||||||
|
</a>
|
||||||
|
(84% documented)
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="header-col--secondary">
|
||||||
|
<form role="search" action="search.json">
|
||||||
|
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||||
|
</form>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<p class="breadcrumbs">
|
||||||
|
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||||
|
<img class="carat" src="img/carat.png" />
|
||||||
|
SocketIO Reference
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<nav class="navigation">
|
||||||
|
<ul class="nav-groups">
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols.html#/s:P8SocketIO10SocketData">SocketData</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-name">
|
||||||
|
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||||
|
<ul class="nav-group-tasks">
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-group-task">
|
||||||
|
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<article class="main-content">
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="section-content">
|
||||||
|
|
||||||
|
<p><a href="https://travis-ci.org/socketio/socket.io-client-swift"><img src="https://travis-ci.org/socketio/socket.io-client-swift.svg?branch=master" alt="Build Status"></a></p>
|
||||||
|
<h1 id='socket-io-client-swift' class='heading'>Socket.IO-Client-Swift</h1>
|
||||||
|
|
||||||
|
<p>Socket.IO-client for iOS/OS X.</p>
|
||||||
|
<h2 id='example' class='heading'>Example</h2>
|
||||||
|
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">SocketIO</span>
|
||||||
|
|
||||||
|
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://localhost:8080"</span><span class="p">)</span><span class="o">!</span><span class="p">,</span> <span class="nv">config</span><span class="p">:</span> <span class="p">[</span><span class="o">.</span><span class="nf">log</span><span class="p">(</span><span class="kc">true</span><span class="p">),</span> <span class="o">.</span><span class="nf">forcePolling</span><span class="p">(</span><span class="kc">true</span><span class="p">)])</span>
|
||||||
|
|
||||||
|
<span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="s">"connect"</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||||
|
<span class="nf">print</span><span class="p">(</span><span class="s">"socket connected"</span><span class="p">)</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
|
||||||
|
<span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="s">"currentAmount"</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||||
|
<span class="k">if</span> <span class="k">let</span> <span class="nv">cur</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">as?</span> <span class="kt">Double</span> <span class="p">{</span>
|
||||||
|
<span class="n">socket</span><span class="o">.</span><span class="nf">emitWithAck</span><span class="p">(</span><span class="s">"canUpdate"</span><span class="p">,</span> <span class="n">cur</span><span class="p">)</span><span class="o">.</span><span class="nf">timingOut</span><span class="p">(</span><span class="nv">after</span><span class="p">:</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span> <span class="k">in</span>
|
||||||
|
<span class="n">socket</span><span class="o">.</span><span class="nf">emit</span><span class="p">(</span><span class="s">"update"</span><span class="p">,</span> <span class="p">[</span><span class="s">"amount"</span><span class="p">:</span> <span class="n">cur</span> <span class="o">+</span> <span class="mf">2.50</span><span class="p">])</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
|
||||||
|
<span class="n">ack</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="s">"Got your currentAmount"</span><span class="p">,</span> <span class="s">"dude"</span><span class="p">)</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
<span class="p">}</span>
|
||||||
|
|
||||||
|
<span class="n">socket</span><span class="o">.</span><span class="nf">connect</span><span class="p">()</span>
|
||||||
|
</code></pre>
|
||||||
|
<h2 id='objective-c-example' class='heading'>Objective-C Example</h2>
|
||||||
|
<pre class="highlight plaintext"><code>@import SocketIO;
|
||||||
|
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
|
||||||
|
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
|
||||||
|
|
||||||
|
[socket on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||||
|
NSLog(@"socket connected");
|
||||||
|
}];
|
||||||
|
|
||||||
|
[socket on:@"currentAmount" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||||
|
double cur = [[data objectAtIndex:0] floatValue];
|
||||||
|
|
||||||
|
[[socket emitWithAck:@"canUpdate" with:@[@(cur)]] timingOutAfter:0 callback:^(NSArray* data) {
|
||||||
|
[socket emit:@"update" withItems:@[@{@"amount": @(cur + 2.50)}]];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[ack with:@[@"Got your currentAmount, ", @"dude"]];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[socket connect];
|
||||||
|
|
||||||
|
</code></pre>
|
||||||
|
<h2 id='features' class='heading'>Features</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Supports socket.io 1.0+</li>
|
||||||
|
<li>Supports binary</li>
|
||||||
|
<li>Supports Polling and WebSockets</li>
|
||||||
|
<li>Supports TLS/SSL</li>
|
||||||
|
<li>Can be used from Objective-C</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id='installation' class='heading'>Installation</h2>
|
||||||
|
|
||||||
|
<p>Requires Swift 3/Xcode 8.x</p>
|
||||||
|
|
||||||
|
<p>If you need swift 2.3 use the swift2.3 tag (Pre-Swift 3 support is no longer maintained)</p>
|
||||||
|
|
||||||
|
<p>If you need swift 2.2 use 7.x (Pre-Swift 3 support is no longer maintained)</p>
|
||||||
|
|
||||||
|
<p>If you need Swift 2.1 use v5.5.0 (Pre-Swift 2.2 support is no longer maintained)</p>
|
||||||
|
|
||||||
|
<p>If you need Swift 1.2 use v2.4.5 (Pre-Swift 2 support is no longer maintained)</p>
|
||||||
|
|
||||||
|
<p>If you need Swift 1.1 use v1.5.2. (Pre-Swift 1.2 support is no longer maintained)</p>
|
||||||
|
<h3 id='manually-ios-7' class='heading'>Manually (iOS 7+)</h3>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li>Copy the Source folder into your Xcode project. (Make sure you add the files to your target(s))</li>
|
||||||
|
<li>If you plan on using this from Objective-C, read <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html">this</a> on exposing Swift code to Objective-C.</li>
|
||||||
|
</ol>
|
||||||
|
<h3 id='swift-package-manager' class='heading'>Swift Package Manager</h3>
|
||||||
|
|
||||||
|
<p>Add the project as a dependency to your Package.swift:</p>
|
||||||
|
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||||
|
|
||||||
|
<span class="k">let</span> <span class="nv">package</span> <span class="o">=</span> <span class="kt">Package</span><span class="p">(</span>
|
||||||
|
<span class="nv">name</span><span class="p">:</span> <span class="s">"YourSocketIOProject"</span><span class="p">,</span>
|
||||||
|
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
|
||||||
|
<span class="o">.</span><span class="kt">Package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/socketio/socket.io-client-swift"</span><span class="p">,</span> <span class="nv">majorVersion</span><span class="p">:</span> <span class="mi">8</span><span class="p">)</span>
|
||||||
|
<span class="p">]</span>
|
||||||
|
<span class="p">)</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Then import <code>import SocketIO</code>.</p>
|
||||||
|
<h3 id='carthage' class='heading'>Carthage</h3>
|
||||||
|
|
||||||
|
<p>Add this line to your <code>Cartfile</code>:</p>
|
||||||
|
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift" ~> 8.3.3 # Or latest version
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Run <code>carthage update --platform ios,macosx</code>.</p>
|
||||||
|
<h3 id='cocoapods-1-0-0-or-later' class='heading'>CocoaPods 1.0.0 or later</h3>
|
||||||
|
|
||||||
|
<p>Create <code>Podfile</code> and add <code>pod 'Socket.IO-Client-Swift'</code>:</p>
|
||||||
|
<pre class="highlight ruby"><code><span class="n">use_frameworks!</span>
|
||||||
|
|
||||||
|
<span class="n">target</span> <span class="s1">'YourApp'</span> <span class="k">do</span>
|
||||||
|
<span class="n">pod</span> <span class="s1">'Socket.IO-Client-Swift'</span><span class="p">,</span> <span class="s1">'~> 8.3.3'</span> <span class="c1"># Or latest version</span>
|
||||||
|
<span class="k">end</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Install pods:</p>
|
||||||
|
<pre class="highlight plaintext"><code>$ pod install
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Import the module:</p>
|
||||||
|
|
||||||
|
<p>Swift:</p>
|
||||||
|
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">SocketIO</span>
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Objective-C:</p>
|
||||||
|
<pre class="highlight plaintext"><code>@import SocketIO;
|
||||||
|
</code></pre>
|
||||||
|
<h3 id='cocoaseeds' class='heading'>CocoaSeeds</h3>
|
||||||
|
|
||||||
|
<p>Add this line to your <code>Seedfile</code>:</p>
|
||||||
|
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift", "v8.3.3", :files => "Source/*.swift" # Or latest version
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Run <code>seed install</code>.</p>
|
||||||
|
<h1 id='api' class='heading'>API</h1>
|
||||||
|
<h2 id='constructors' class='heading'>Constructors</h2>
|
||||||
|
|
||||||
|
<p><code>init(var socketURL: NSURL, config: SocketIOClientConfiguration = [])</code> - Creates a new SocketIOClient. If your socket.io server is secure, you need to specify <code>https</code> in your socketURL.</p>
|
||||||
|
|
||||||
|
<p><code>convenience init(socketURL: NSURL, options: NSDictionary?)</code> - Same as above, but meant for Objective-C. See Options on how convert between SocketIOClientOptions and dictionary keys.</p>
|
||||||
|
<h3 id='options' class='heading'>Options</h3>
|
||||||
|
|
||||||
|
<p>All options are a case of SocketIOClientOption. To get the Objective-C Option, convert the name to lowerCamelCase.</p>
|
||||||
|
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">connectParams</span><span class="p">([</span><span class="kt">String</span><span class="p">:</span> <span class="kt">AnyObject</span><span class="p">])</span> <span class="c1">// Dictionary whose contents will be passed with the connection.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">cookies</span><span class="p">([</span><span class="kt">NSHTTPCookie</span><span class="p">])</span> <span class="c1">// An array of NSHTTPCookies. Passed during the handshake. Default is nil.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">doubleEncodeUTF8</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// Whether or not to double encode utf8. If using the node based server this should be true. Default is true.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">extraHeaders</span><span class="p">([</span><span class="kt">String</span><span class="p">:</span> <span class="kt">String</span><span class="p">])</span> <span class="c1">// Adds custom headers to the initial request. Default is nil.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">forcePolling</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// `true` forces the client to use xhr-polling. Default is `false`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">forceNew</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// Will a create a new engine for each connect. Useful if you find a bug in the engine related to reconnects</span>
|
||||||
|
<span class="k">case</span> <span class="nf">forceWebsockets</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// `true` forces the client to use WebSockets. Default is `false`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">handleQueue</span><span class="p">(</span><span class="n">dispatch_queue_t</span><span class="p">)</span> <span class="c1">// The dispatch queue that handlers are run on. Default is the main queue.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">log</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// If `true` socket will log debug messages. Default is false.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">logger</span><span class="p">(</span><span class="kt">SocketLogger</span><span class="p">)</span> <span class="c1">// Custom logger that conforms to SocketLogger. Will use the default logging otherwise.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">nsp</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span> <span class="c1">// The namespace to connect to. Must begin with /. Default is `/`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">path</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span> <span class="c1">// If the server uses a custom path. ex: `"/swift/"`. Default is `""`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">reconnects</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// Whether to reconnect on server lose. Default is `true`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">reconnectAttempts</span><span class="p">(</span><span class="kt">Int</span><span class="p">)</span> <span class="c1">// How many times to reconnect. Default is `-1` (infinite tries)</span>
|
||||||
|
<span class="k">case</span> <span class="nf">reconnectWait</span><span class="p">(</span><span class="kt">Int</span><span class="p">)</span> <span class="c1">// Amount of time to wait between reconnects. Default is `10`</span>
|
||||||
|
<span class="k">case</span> <span class="nf">sessionDelegate</span><span class="p">(</span><span class="kt">NSURLSessionDelegate</span><span class="p">)</span> <span class="c1">// Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs. Default is nil.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">secure</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// If the connection should use TLS. Default is false.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">security</span><span class="p">(</span><span class="kt">SSLSecurity</span><span class="p">)</span> <span class="c1">// Allows you to set which certs are valid. Useful for SSL pinning.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">selfSigned</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// Sets WebSocket.selfSignedSSL. Use this if you're using self-signed certs.</span>
|
||||||
|
<span class="k">case</span> <span class="nf">voipEnabled</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span> <span class="c1">// Only use this option if you're using the client with VoIP services. Changes the way the WebSocket is created. Default is false</span>
|
||||||
|
</code></pre>
|
||||||
|
<h3 id='methods' class='heading'>Methods</h3>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li><code>on(_ event: String, callback: NormalCallback) -> NSUUID</code> - Adds a handler for an event. Items are passed by an array. <code>ack</code> can be used to send an ack when one is requested. See example. Returns a unique id for the handler.</li>
|
||||||
|
<li><code>once(_ event: String, callback: NormalCallback) -> NSUUID</code> - Adds a handler that will only be executed once. Returns a unique id for the handler.</li>
|
||||||
|
<li><code>onAny(callback:((event: String, items: AnyObject?)) -> Void)</code> - Adds a handler for all events. It will be called on any received event.</li>
|
||||||
|
<li><code>emit(_ event: String, _ items: AnyObject...)</code> - Sends a message. Can send multiple items.</li>
|
||||||
|
<li><code>emit(_ event: String, withItems items: [AnyObject])</code> - <code>emit</code> for Objective-C</li>
|
||||||
|
<li><code>emitWithAck(_ event: String, _ items: AnyObject...) -> OnAckCallback</code> - Sends a message that requests an acknowledgement from the server. Returns an object which you can use to add a handler. See example. Note: The message is not sent until you call timingOut(after:) on the returned object.</li>
|
||||||
|
<li><code>emitWithAck(_ event: String, withItems items: [AnyObject]) -> OnAckCallback</code> - <code>emitWithAck</code> for Objective-C. Note: The message is not sent until you call timingOutAfter on the returned object.</li>
|
||||||
|
<li><code>connect()</code> - Establishes a connection to the server. A <q>connect</q> event is fired upon successful connection.</li>
|
||||||
|
<li><code>connect(timeoutAfter timeoutAfter: Int, withTimeoutHandler handler: (() -> Void)?)</code> - Connect to the server. If it isn’t connected after timeoutAfter seconds, the handler is called.</li>
|
||||||
|
<li><code>disconnect()</code> - Closes the socket. Reopening a disconnected socket is not fully tested.</li>
|
||||||
|
<li><code>reconnect()</code> - Causes the client to reconnect to the server.</li>
|
||||||
|
<li><code>joinNamespace(_ namespace: String)</code> - Causes the client to join namespace. Shouldn’t need to be called unless you change namespaces manually.</li>
|
||||||
|
<li><code>leaveNamespace()</code> - Causes the client to leave the nsp and go back to /</li>
|
||||||
|
<li><code>off(_ event: String)</code> - Removes all event handlers for event.</li>
|
||||||
|
<li><code>off(id id: NSUUID)</code> - Removes the event that corresponds to id.</li>
|
||||||
|
<li><code>removeAllHandlers()</code> - Removes all handlers.</li>
|
||||||
|
</ol>
|
||||||
|
<h3 id='client-events' class='heading'>Client Events</h3>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
<li><code>connect</code> - Emitted when on a successful connection.</li>
|
||||||
|
<li><code>disconnect</code> - Emitted when the connection is closed.</li>
|
||||||
|
<li><code>error</code> - Emitted on an error.</li>
|
||||||
|
<li><code>reconnect</code> - Emitted when the connection is starting to reconnect.</li>
|
||||||
|
<li><code>reconnectAttempt</code> - Emitted when attempting to reconnect.</li>
|
||||||
|
</ol>
|
||||||
|
<h2 id='detailed-example' class='heading'>Detailed Example</h2>
|
||||||
|
|
||||||
|
<p>A more detailed example can be found <a href="https://github.com/nuclearace/socket.io-client-swift-example">here</a></p>
|
||||||
|
|
||||||
|
<p>An example using the Swift Package Manager can be found <a href="https://github.com/nuclearace/socket.io-client-swift-spm-example">here</a></p>
|
||||||
|
<h2 id='license' class='heading'>License</h2>
|
||||||
|
|
||||||
|
<p>MIT</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<section class="footer">
|
||||||
|
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-06)</p>
|
||||||
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
43
docs/js/jazzy.js
Executable file
43
docs/js/jazzy.js
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
window.jazzy = {'docset': false}
|
||||||
|
if (typeof window.dash != 'undefined') {
|
||||||
|
document.documentElement.className += ' dash'
|
||||||
|
window.jazzy.docset = true
|
||||||
|
}
|
||||||
|
if (navigator.userAgent.match(/xcode/i)) {
|
||||||
|
document.documentElement.className += ' xcode'
|
||||||
|
window.jazzy.docset = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// On doc load, toggle the URL hash discussion if present
|
||||||
|
$(document).ready(function() {
|
||||||
|
if (!window.jazzy.docset) {
|
||||||
|
var linkToHash = $('a[href="' + window.location.hash +'"]');
|
||||||
|
linkToHash.trigger("click");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// On token click, toggle its discussion and animate token.marginLeft
|
||||||
|
$(".token").click(function(event) {
|
||||||
|
if (window.jazzy.docset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var link = $(this);
|
||||||
|
var animationDuration = 300;
|
||||||
|
$content = link.parent().parent().next();
|
||||||
|
$content.slideToggle(animationDuration);
|
||||||
|
|
||||||
|
// Keeps the document from jumping to the hash.
|
||||||
|
var href = $(this).attr('href');
|
||||||
|
if (history.pushState) {
|
||||||
|
history.pushState({}, '', href);
|
||||||
|
} else {
|
||||||
|
location.hash = href;
|
||||||
|
}
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Dumb down quotes within code blocks that delimit strings instead of quotations
|
||||||
|
// https://github.com/realm/jazzy/issues/714
|
||||||
|
$("code q").replaceWith(function () {
|
||||||
|
return ["\"", $(this).contents(), "\""];
|
||||||
|
});
|
||||||
62
docs/js/jazzy.search.js
Normal file
62
docs/js/jazzy.search.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
$(function(){
|
||||||
|
var searchIndex = lunr(function() {
|
||||||
|
this.ref('url');
|
||||||
|
this.field('name');
|
||||||
|
});
|
||||||
|
|
||||||
|
var $typeahead = $('[data-typeahead]');
|
||||||
|
var $form = $typeahead.parents('form');
|
||||||
|
var searchURL = $form.attr('action');
|
||||||
|
|
||||||
|
function displayTemplate(result) {
|
||||||
|
return result.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
function suggestionTemplate(result) {
|
||||||
|
var t = '<div class="list-group-item clearfix">';
|
||||||
|
t += '<span class="doc-name">' + result.name + '</span>';
|
||||||
|
if (result.parent_name) {
|
||||||
|
t += '<span class="doc-parent-name label">' + result.parent_name + '</span>';
|
||||||
|
}
|
||||||
|
t += '</div>';
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
$typeahead.one('focus', function() {
|
||||||
|
$form.addClass('loading');
|
||||||
|
|
||||||
|
$.getJSON(searchURL).then(function(searchData) {
|
||||||
|
$.each(searchData, function (url, doc) {
|
||||||
|
searchIndex.add({url: url, name: doc.name});
|
||||||
|
});
|
||||||
|
|
||||||
|
$typeahead.typeahead(
|
||||||
|
{
|
||||||
|
highlight: true,
|
||||||
|
minLength: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
limit: 10,
|
||||||
|
display: displayTemplate,
|
||||||
|
templates: { suggestion: suggestionTemplate },
|
||||||
|
source: function(query, sync) {
|
||||||
|
var results = searchIndex.search(query).map(function(result) {
|
||||||
|
var doc = searchData[result.ref];
|
||||||
|
doc.url = result.ref;
|
||||||
|
return doc;
|
||||||
|
});
|
||||||
|
sync(results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
$form.removeClass('loading');
|
||||||
|
$typeahead.trigger('focus');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var baseURL = searchURL.slice(0, -"search.json".length);
|
||||||
|
|
||||||
|
$typeahead.on('typeahead:select', function(e, result) {
|
||||||
|
window.location = baseURL + result.url;
|
||||||
|
});
|
||||||
|
});
|
||||||
4
docs/js/jquery.min.js
vendored
Executable file
4
docs/js/jquery.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
6
docs/js/lunr.min.js
vendored
Executable file
6
docs/js/lunr.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
1538
docs/js/typeahead.jquery.js
Normal file
1538
docs/js/typeahead.jquery.js
Normal file
File diff suppressed because it is too large
Load Diff
1
docs/search.json
Normal file
1
docs/search.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user