Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36db2ff0eb | ||
|
|
046bb0e9ff | ||
|
|
0dc4dd4a93 | ||
|
|
cb74f6ca55 | ||
|
|
1a0f6bb6ce | ||
|
|
091797f9b7 | ||
|
|
5611c8ad24 | ||
|
|
ae54ea01d0 | ||
|
|
1db9232d71 | ||
|
|
5dcfe18748 | ||
|
|
558ea65aa1 | ||
|
|
0d44b10734 | ||
|
|
c1744e9e6f | ||
|
|
2fd9e4b993 | ||
|
|
44682659b6 | ||
|
|
148c302474 | ||
|
|
6037b85f4b | ||
|
|
bd7428485c | ||
|
|
3df38fcff5 | ||
|
|
7219906306 | ||
|
|
7e0917c2cd | ||
|
|
1a8285fcf0 | ||
|
|
fc4e1802f6 | ||
|
|
19a177485d | ||
|
|
00aaea935c | ||
|
|
6a3d82c60a | ||
|
|
4c98c24047 | ||
|
|
a17a66af00 | ||
|
|
9433050588 | ||
|
|
49b9a07a95 | ||
|
|
f407beab99 | ||
|
|
fa81fc222f | ||
|
|
649989fd83 | ||
|
|
f7ef126d97 | ||
|
|
e4f63e8f15 | ||
|
|
3cfd12b0bc | ||
|
|
94b01420af | ||
|
|
ec86a19fc6 | ||
|
|
e0cbe59a10 | ||
|
|
8f94c038d8 | ||
|
|
a4b334b6f2 | ||
|
|
9708019adc | ||
|
|
5a6a4f02d9 | ||
|
|
75057023cb | ||
|
|
d839a35340 | ||
|
|
d5a478f64a | ||
|
|
e5f3fb13ae | ||
|
|
0d8890defd | ||
|
|
016e12720d | ||
|
|
d25a926226 | ||
|
|
09fc43349f | ||
|
|
b3e305fd14 | ||
|
|
d763fad449 | ||
|
|
e877bb26c3 | ||
|
|
28fad62ccd | ||
|
|
f9d8595a25 | ||
|
|
3bf28cd427 | ||
|
|
c3032579c0 | ||
|
|
867db19bc5 | ||
|
|
cfa6a217be | ||
|
|
520ff72395 | ||
|
|
25df8b66fc | ||
|
|
d632135289 | ||
|
|
a3d443268a | ||
|
|
d03e319e35 | ||
|
|
165ec25713 | ||
|
|
35c93ee6f5 | ||
|
|
cc90426d94 | ||
|
|
6db5348daa | ||
|
|
9bf073156f | ||
|
|
8f50375cf2 | ||
|
|
451f4c1b69 | ||
|
|
95aa544275 | ||
|
|
eab73c81a7 | ||
|
|
cfc01ac9fc | ||
|
|
64d2527190 | ||
|
|
b48f1e9af5 | ||
|
|
6cfea5aca3 | ||
|
|
d06c1e5f5b | ||
|
|
2cc47b0117 | ||
|
|
884cc6f8f1 | ||
|
|
2629449436 | ||
|
|
0a7e1f4185 | ||
|
|
5fdff65281 | ||
|
|
f7ccf338ad | ||
|
|
feb476c76b | ||
|
|
b258a93750 | ||
|
|
d07441e7fa | ||
|
|
6564d1a0c5 | ||
|
|
41af615428 | ||
|
|
4ea1bb9c43 | ||
|
|
c3cabe43bf | ||
|
|
6ff403fad1 | ||
|
|
b73afe0da9 | ||
|
|
be43b0ab3c | ||
|
|
24f3106fe7 | ||
|
|
1b6144a78c | ||
|
|
948ea5fa00 | ||
|
|
d21a65e117 | ||
|
|
4564aebec1 | ||
|
|
840892288b | ||
|
|
47bcfb1299 | ||
|
|
d24e8f83c6 | ||
|
|
731aaf4203 | ||
|
|
746be11f3b |
No files matched your search
@@ -1 +0,0 @@
|
||||
system
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
language: objective-c
|
||||
xcode_project: Socket.IO-Client-Swift.xcodeproj # path to your xcodeproj folder
|
||||
xcode_scheme: SocketIO-Mac
|
||||
osx_image: xcode9
|
||||
osx_image: xcode11.2
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
+48
-2
@@ -1,3 +1,50 @@
|
||||
# v15.2.0
|
||||
|
||||
- Small fixes.
|
||||
|
||||
# v15.1.0
|
||||
|
||||
- Add ability to enable websockets SOCKS proxy.
|
||||
- Fix emit completion callback not firing on websockets [#1178](https://github.com/socketio/socket.io-client-swift/issues/1178)
|
||||
|
||||
# v15.0.0
|
||||
|
||||
- Swift 5
|
||||
|
||||
# v14.0.0
|
||||
|
||||
- Minimum version of the client is now Swift 4.2.
|
||||
- Add exponential backoff for reconnects, with `reconnectWaitMax` and `randomizationFactor` options [#1149](https://github.com/socketio/socket.io-client-swift/pull/1149)
|
||||
- `statusChange` event's data format adds a second value, the raw value of the status. This is for use in Objective-C. [#1147](https://github.com/socketio/socket.io-client-swift/issues/1147)
|
||||
|
||||
# v13.4.0
|
||||
|
||||
- Add emits with write completion handlers. [#1096](https://github.com/socketio/socket.io-client-swift/issues/1096)
|
||||
- Add ability to listen for when a websocket upgrade happens
|
||||
|
||||
# v13.3.1
|
||||
|
||||
- Fixes various bugs. [#857](https://github.com/socketio/socket.io-client-swift/issues/857), [#1078](https://github.com/socketio/socket.io-client-swift/issues/1078)
|
||||
|
||||
# v13.3.0
|
||||
|
||||
- Copy cookies from polling to WebSockets ([#1057](https://github.com/socketio/socket.io-client-swift/issues/1057), [#1058](https://github.com/socketio/socket.io-client-swift/issues/1058))
|
||||
|
||||
# v13.2.1
|
||||
|
||||
- Fix packets getting lost when WebSocket upgrade fails. [#1033](https://github.com/socketio/socket.io-client-swift/issues/1033)
|
||||
- Fix bad unit tests. [#794](https://github.com/socketio/socket.io-client-swift/issues/794)
|
||||
|
||||
# v13.2.0
|
||||
|
||||
- Add ability to bypass Data inspection in emits. [#992]((https://github.com/socketio/socket.io-client-swift/issues/992))
|
||||
- Allow `SocketEngine` to be subclassed
|
||||
|
||||
# v13.1.3
|
||||
|
||||
- Fix setting reconnectAttempts [#989]((https://github.com/socketio/socket.io-client-swift/issues/989))
|
||||
|
||||
|
||||
# v13.1.2
|
||||
|
||||
- Fix [#950](https://github.com/socketio/socket.io-client-swift/issues/950)
|
||||
@@ -29,7 +76,7 @@ Checkout out the migration guide in Usage Docs for a more detailed guide on how
|
||||
What's new:
|
||||
---
|
||||
|
||||
- Adds a new `SocketManager` class that multiplexes multiple namespaces through a single engine.
|
||||
- Adds a new `SocketManager` class that multiplexes multiple namespaces through a single engine.
|
||||
- Adds `.sentPing` and `.gotPong` client events for tracking ping/pongs.
|
||||
- watchOS support.
|
||||
|
||||
@@ -41,4 +88,3 @@ Important API changes
|
||||
- Adds `.sentPing` and `.gotPong` client events for tracking ping/pongs.
|
||||
- Makes the framework a single target.
|
||||
- Updates Starscream to 3.0
|
||||
|
||||
@@ -1 +1 @@
|
||||
github "daltoniam/Starscream" ~> 3.0
|
||||
github "daltoniam/Starscream" ~> 3.1
|
||||
+1
-3
@@ -1,3 +1 @@
|
||||
github "daltoniam/Starscream" "3.0.3"
|
||||
github "daltoniam/common-crypto-spm" "1.1.0"
|
||||
github "daltoniam/zlib-spm" "1.1.0"
|
||||
github "daltoniam/Starscream" "3.1.0"
|
||||
+2
-20
@@ -1,31 +1,13 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "SSCZLib",
|
||||
"repositoryURL": "https://github.com/daltoniam/zlib-spm.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "83ac8d719a2f3aa775dbdf116a57f56fb2c49abb",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "SSCommonCrypto",
|
||||
"repositoryURL": "https://github.com/daltoniam/common-crypto-spm",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "2eb3aff0fb57f92f5722fac5d6d20bf64669ca66",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Starscream",
|
||||
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "6cb1c474e09b0a3aa60bcdc7553b570336d6a61a",
|
||||
"version": "3.0.3"
|
||||
"revision": "9c03ef715d1bc9334b446c90df53586dd38cf849",
|
||||
"version": "3.1.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:4.0
|
||||
// swift-tools-version:5.0
|
||||
|
||||
import PackageDescription
|
||||
|
||||
@@ -8,7 +8,7 @@ let package = Package(
|
||||
.library(name: "SocketIO", targets: ["SocketIO"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/daltoniam/Starscream", .upToNextMinor(from: "3.0.0")),
|
||||
.package(url: "https://github.com/daltoniam/Starscream", .upToNextMinor(from: "3.1.0")),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "SocketIO", dependencies: ["Starscream"]),
|
||||
|
||||
@@ -63,11 +63,11 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
## FAQS
|
||||
Checkout the [FAQs](https://nuclearace.github.io/Socket.IO-Client-Swift/faq.html) for commonly asked questions.
|
||||
|
||||
Checkout the [12to13](https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html) guide for migrating to v13.
|
||||
Checkout the [12to13](https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html) guide for migrating to v13+ from v12 below.
|
||||
|
||||
|
||||
## Installation
|
||||
Requires Swift 4/Xcode 9.x
|
||||
Requires Swift 4/5 and Xcode 10.x
|
||||
|
||||
If you need Swift 2.3 use the [swift2.3 tag](https://github.com/socketio/socket.io-client-swift/releases/tag/swift2.3) (Pre-Swift 4 support is no longer maintained)
|
||||
|
||||
@@ -76,7 +76,7 @@ If you need Swift 3.x use v11.1.3.
|
||||
### Swift Package Manager
|
||||
Add the project as a dependency to your Package.swift:
|
||||
```swift
|
||||
// swift-tools-version:4.0
|
||||
// swift-tools-version:4.2
|
||||
|
||||
import PackageDescription
|
||||
|
||||
@@ -86,7 +86,7 @@ let package = Package(
|
||||
.executable(name: "socket.io-test", targets: ["YourTargetName"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMinor(from: "13.1.0"))
|
||||
.package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMinor(from: "15.0.0"))
|
||||
],
|
||||
targets: [
|
||||
.target(name: "YourTargetName", dependencies: ["SocketIO"], path: "./Path/To/Your/Sources")
|
||||
@@ -99,7 +99,7 @@ Then import `import SocketIO`.
|
||||
### Carthage
|
||||
Add this line to your `Cartfile`:
|
||||
```
|
||||
github "socketio/socket.io-client-swift" ~> 13.1.0
|
||||
github "socketio/socket.io-client-swift" ~> 15.2.0
|
||||
```
|
||||
|
||||
Run `carthage update --platform ios,macosx`.
|
||||
@@ -113,7 +113,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
|
||||
use_frameworks!
|
||||
|
||||
target 'YourApp' do
|
||||
pod 'Socket.IO-Client-Swift', '~> 13.1.0'
|
||||
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
|
||||
end
|
||||
```
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Socket.IO-Client-Swift"
|
||||
s.module_name = "SocketIO"
|
||||
s.version = "13.1.2"
|
||||
s.version = "15.2.0"
|
||||
s.summary = "Socket.IO-client for iOS and OS X"
|
||||
s.description = <<-DESC
|
||||
Socket.IO-client for iOS and OS X.
|
||||
@@ -18,12 +18,14 @@ Pod::Spec.new do |s|
|
||||
s.requires_arc = true
|
||||
s.source = {
|
||||
:git => "https://github.com/socketio/socket.io-client-swift.git",
|
||||
:tag => 'v13.1.2',
|
||||
:tag => 'v15.2.0',
|
||||
:submodules => true
|
||||
}
|
||||
|
||||
s.swift_version = "5"
|
||||
s.pod_target_xcconfig = {
|
||||
'SWIFT_VERSION' => '4.0'
|
||||
'SWIFT_VERSION' => '5.0'
|
||||
}
|
||||
s.source_files = "Source/SocketIO/**/*.swift", "Source/SocketIO/*.swift"
|
||||
s.dependency "Starscream", "~> 3.0.2"
|
||||
s.dependency "Starscream", "~> 3.1"
|
||||
end
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1C6572803D7E252A77A86E5F /* SocketManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C65763817782DFAC67BE05C /* SocketManager.swift */; };
|
||||
1C6573B22DC9423CDFC32F05 /* SocketRawView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C657533E849FC3E4342C602 /* SocketRawView.swift */; };
|
||||
1C657CDE5D510E8E2E573E39 /* utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6577B639C34EE1C8829D9A /* utils.swift */; };
|
||||
1C657FBB3F670261780FD72E /* SocketManagerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6574AF9687A213814753E4 /* SocketManagerSpec.swift */; };
|
||||
1C686BE21F869AFD007D8627 /* SocketIOClientConfigurationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD21F869AF1007D8627 /* SocketIOClientConfigurationTest.swift */; };
|
||||
1C686BE31F869AFD007D8627 /* SocketEngineTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD31F869AF1007D8627 /* SocketEngineTest.swift */; };
|
||||
@@ -61,7 +63,9 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1C6574AF9687A213814753E4 /* SocketManagerSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketManagerSpec.swift; sourceTree = "<group>"; };
|
||||
1C657533E849FC3E4342C602 /* SocketRawView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketRawView.swift; sourceTree = "<group>"; };
|
||||
1C65763817782DFAC67BE05C /* SocketManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketManager.swift; sourceTree = "<group>"; };
|
||||
1C6577B639C34EE1C8829D9A /* utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = utils.swift; sourceTree = "<group>"; };
|
||||
1C686BD21F869AF1007D8627 /* SocketIOClientConfigurationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketIOClientConfigurationTest.swift; sourceTree = "<group>"; };
|
||||
1C686BD31F869AF1007D8627 /* SocketEngineTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketEngineTest.swift; sourceTree = "<group>"; };
|
||||
1C686BD41F869AF1007D8627 /* SocketSideEffectTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketSideEffectTest.swift; sourceTree = "<group>"; };
|
||||
@@ -157,6 +161,7 @@
|
||||
1C686BD71F869AF1007D8627 /* SocketParserTest.swift */,
|
||||
1C686BD81F869AF1007D8627 /* SocketNamespacePacketTest.swift */,
|
||||
DD52BBAC5FAA7730D32CD5BF /* SocketMangerTest.swift */,
|
||||
1C6577B639C34EE1C8829D9A /* utils.swift */,
|
||||
);
|
||||
name = TestSocketIO;
|
||||
path = Tests/TestSocketIO;
|
||||
@@ -300,6 +305,7 @@
|
||||
DD52B078DB0A3C3D1BB507CD /* SocketIOClientOption.swift */,
|
||||
DD52B1D9BC4AE46D38D827DE /* SocketIOStatus.swift */,
|
||||
DD52B57FFEE8560CFFD793B3 /* SocketIOClientConfiguration.swift */,
|
||||
1C657533E849FC3E4342C602 /* SocketRawView.swift */,
|
||||
);
|
||||
name = Client;
|
||||
path = Source/SocketIO/Client;
|
||||
@@ -388,7 +394,7 @@
|
||||
attributes = {
|
||||
LastSwiftMigration = 0730;
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
572EF2371B51F18A00EEBB58 = {
|
||||
CreatedOnToolsVersion = 6.4;
|
||||
@@ -405,6 +411,7 @@
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
);
|
||||
mainGroup = 572EF20D1B51F12F00EEBB58;
|
||||
@@ -480,6 +487,7 @@
|
||||
DD52B9412F660F828B683422 /* SocketParsable.swift in Sources */,
|
||||
1C6572803D7E252A77A86E5F /* SocketManager.swift in Sources */,
|
||||
1C657FBB3F670261780FD72E /* SocketManagerSpec.swift in Sources */,
|
||||
1C6573B22DC9423CDFC32F05 /* SocketRawView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -497,6 +505,7 @@
|
||||
1C686BE81F869AFD007D8627 /* SocketNamespacePacketTest.swift in Sources */,
|
||||
DD52BCCD25EFA76E0F9B313C /* SocketMangerTest.swift in Sources */,
|
||||
DD52B53F2609D91A683DFCDD /* ManagerObjectiveCTest.m in Sources */,
|
||||
1C657CDE5D510E8E2E573E39 /* utils.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -515,22 +524,25 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = bitcode;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
ENABLE_BITCODE = YES;
|
||||
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@@ -577,7 +589,7 @@
|
||||
PRODUCT_NAME = SocketIO;
|
||||
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos iphonesimulator iphoneos watchos watchsimulator";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VALID_ARCHS = "i386 x86_64 armv7 armv7s arm64 armv7k";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
@@ -588,22 +600,25 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = bitcode;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
ENABLE_BITCODE = YES;
|
||||
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@@ -647,7 +662,7 @@
|
||||
PRODUCT_NAME = SocketIO;
|
||||
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos iphonesimulator iphoneos watchos watchsimulator";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 9.0;
|
||||
VALID_ARCHS = "i386 x86_64 armv7 armv7s arm64 armv7k";
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0;
|
||||
@@ -715,7 +730,7 @@
|
||||
SWIFT_INCLUDE_PATHS = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "$(inherited)";
|
||||
@@ -778,7 +793,7 @@
|
||||
SUPPORTED_PLATFORMS = "$(inherited)";
|
||||
SWIFT_INCLUDE_PATHS = "";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,3,4";
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "$(inherited)";
|
||||
@@ -863,7 +878,7 @@
|
||||
SUPPORTED_PLATFORMS = "$(inherited)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "$(inherited)";
|
||||
};
|
||||
@@ -937,7 +952,7 @@
|
||||
SDKROOT = macosx;
|
||||
SUPPORTED_PLATFORMS = "$(inherited)";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
VALID_ARCHS = "$(inherited)";
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,7 +40,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
@@ -70,7 +69,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -29,8 +29,20 @@ import Foundation
|
||||
///
|
||||
/// **NOTE**: You should not store this beyond the life of the event handler.
|
||||
public final class SocketAckEmitter : NSObject {
|
||||
let socket: SocketIOClient
|
||||
let ackNum: Int
|
||||
private unowned let socket: SocketIOClient
|
||||
private let ackNum: Int
|
||||
|
||||
/// A view into this emitter where emits do not check for binary data.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// ack.rawEmitView.with(myObject)
|
||||
/// ```
|
||||
///
|
||||
/// **NOTE**: It is not safe to hold on to this view beyond the life of the socket.
|
||||
@objc
|
||||
public private(set) lazy var rawEmitView = SocketRawAckView(socket: socket, ackNum: ackNum)
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
@@ -63,8 +75,8 @@ public final class SocketAckEmitter : NSObject {
|
||||
|
||||
do {
|
||||
socket.emitAck(ackNum, with: try items.map({ try $0.socketRepresentation() }))
|
||||
} catch let err {
|
||||
socket.handleClientEvent(.error, data: [ackNum, items, err])
|
||||
} catch {
|
||||
socket.handleClientEvent(.error, data: [ackNum, items, error])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,15 +103,19 @@ public final class SocketAckEmitter : NSObject {
|
||||
/// ```
|
||||
public final class OnAckCallback : NSObject {
|
||||
private let ackNumber: Int
|
||||
private let binary: Bool
|
||||
private let items: [Any]
|
||||
|
||||
private weak var socket: SocketIOClient?
|
||||
|
||||
init(ackNumber: Int, items: [Any], socket: SocketIOClient) {
|
||||
init(ackNumber: Int, items: [Any], socket: SocketIOClient, binary: Bool = true) {
|
||||
self.ackNumber = ackNumber
|
||||
self.items = items
|
||||
self.socket = socket
|
||||
self.binary = binary
|
||||
}
|
||||
|
||||
/// :nodoc:
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("OnAckCallback for \(ackNumber) being released", type: "OnAckCallback")
|
||||
}
|
||||
@@ -116,7 +132,7 @@ public final class OnAckCallback : NSObject {
|
||||
guard let socket = self.socket, ackNumber != -1 else { return }
|
||||
|
||||
socket.ackHandlers.addAck(ackNumber, callback: callback)
|
||||
socket.emit(items, ack: ackNumber)
|
||||
socket.emit(items, ack: ackNumber, binary: binary)
|
||||
|
||||
guard seconds != 0 else { return }
|
||||
|
||||
|
||||
@@ -36,9 +36,6 @@ public enum SocketAckStatus : String {
|
||||
private struct SocketAck : Hashable {
|
||||
let ack: Int
|
||||
var callback: AckCallback!
|
||||
var hashValue: Int {
|
||||
return ack.hashValue
|
||||
}
|
||||
|
||||
init(ack: Int) {
|
||||
self.ack = ack
|
||||
@@ -49,6 +46,10 @@ private struct SocketAck : Hashable {
|
||||
self.callback = callback
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
ack.hash(into: &hasher)
|
||||
}
|
||||
|
||||
fileprivate static func <(lhs: SocketAck, rhs: SocketAck) -> Bool {
|
||||
return lhs.ack < rhs.ack
|
||||
}
|
||||
|
||||
@@ -67,11 +67,23 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
@objc
|
||||
public private(set) weak var manager: SocketManagerSpec?
|
||||
|
||||
/// A view into this socket where emits do not check for binary data.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.rawEmitView.emit("myEvent", myObject)
|
||||
/// ```
|
||||
///
|
||||
/// **NOTE**: It is not safe to hold on to this view beyond the life of the socket.
|
||||
@objc
|
||||
public private(set) lazy var rawEmitView = SocketRawView(socket: self)
|
||||
|
||||
/// The status of this client.
|
||||
@objc
|
||||
public private(set) var status = SocketIOStatus.notConnected {
|
||||
didSet {
|
||||
handleClientEvent(.statusChange, data: [status])
|
||||
handleClientEvent(.statusChange, data: [status, status.rawValue])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +107,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
super.init()
|
||||
}
|
||||
|
||||
/// :nodoc:
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("Client is being released", type: logType)
|
||||
}
|
||||
@@ -148,7 +161,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
}
|
||||
}
|
||||
|
||||
private func createOnAck(_ items: [Any]) -> OnAckCallback {
|
||||
func createOnAck(_ items: [Any], binary: Bool = true) -> OnAckCallback {
|
||||
currentAck += 1
|
||||
|
||||
return OnAckCallback(ackNumber: currentAck, items: items, socket: self)
|
||||
@@ -192,21 +205,22 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
leaveNamespace()
|
||||
}
|
||||
|
||||
/// Send an event to the server, with optional data items.
|
||||
/// Send an event to the server, with optional data items and optional write completion handler.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// - 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...) {
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
open func emit(_ event: String, _ items: SocketData..., completion: (() -> ())? = nil) {
|
||||
do {
|
||||
try emit(event, with: items.map({ try $0.socketRepresentation() }))
|
||||
} catch let err {
|
||||
try emit(event, with: items.map({ try $0.socketRepresentation() }), completion: completion)
|
||||
} catch {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: logType)
|
||||
|
||||
handleClientEvent(.error, data: [event, items, err])
|
||||
handleClientEvent(.error, data: [event, items, error])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,14 +230,19 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
/// - parameter items: The items to send with this event. Send an empty array to send no data.
|
||||
@objc
|
||||
open func emit(_ event: String, with items: [Any]) {
|
||||
guard status == .connected else {
|
||||
handleClientEvent(.error, data: ["Tried emitting \(event) when not connected"])
|
||||
return
|
||||
}
|
||||
|
||||
emit([event] + items)
|
||||
}
|
||||
|
||||
/// Same as emit, but meant for Objective-C
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. Send an empty array to send no data.
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
@objc
|
||||
open func emit(_ event: String, with items: [Any], completion: (() -> ())? = nil) {
|
||||
emit([event] + items, completion: completion)
|
||||
}
|
||||
|
||||
/// Sends a message to the server, requesting an ack.
|
||||
///
|
||||
/// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.
|
||||
@@ -246,11 +265,11 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback {
|
||||
do {
|
||||
return emitWithAck(event, with: try items.map({ try $0.socketRepresentation() }))
|
||||
} catch let err {
|
||||
} catch {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: logType)
|
||||
|
||||
handleClientEvent(.error, data: [event, items, err])
|
||||
handleClientEvent(.error, data: [event, items, error])
|
||||
|
||||
return OnAckCallback(ackNumber: -1, items: [], socket: self)
|
||||
}
|
||||
@@ -277,18 +296,32 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
return createOnAck([event] + items)
|
||||
}
|
||||
|
||||
func emit(_ data: [Any], ack: Int? = nil) {
|
||||
func emit(_ data: [Any],
|
||||
ack: Int? = nil,
|
||||
binary: Bool = true,
|
||||
isAck: Bool = false,
|
||||
completion: (() -> ())? = nil
|
||||
) {
|
||||
// wrap the completion handler so it always runs async via handlerQueue
|
||||
let wrappedCompletion: (() -> ())? = (completion == nil) ? nil : {[weak self] in
|
||||
guard let this = self else { return }
|
||||
this.manager?.handleQueue.async {
|
||||
completion!()
|
||||
}
|
||||
}
|
||||
|
||||
guard status == .connected else {
|
||||
wrappedCompletion?()
|
||||
handleClientEvent(.error, data: ["Tried emitting when not connected"])
|
||||
return
|
||||
}
|
||||
|
||||
let packet = SocketPacket.packetFromEmit(data, id: ack ?? -1, nsp: nsp, ack: false)
|
||||
let packet = SocketPacket.packetFromEmit(data, id: ack ?? -1, nsp: nsp, ack: isAck, checkForBinary: binary)
|
||||
let str = packet.packetString
|
||||
|
||||
DefaultSocketLogger.Logger.log("Emitting: \(str)", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Emitting: \(str), Ack: \(isAck)", type: logType)
|
||||
|
||||
manager?.engine?.send(str, withData: packet.binary)
|
||||
manager?.engine?.send(str, withData: packet.binary, completion: wrappedCompletion)
|
||||
}
|
||||
|
||||
/// Call when you wish to tell the server that you've received the event for `ack`.
|
||||
@@ -298,14 +331,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
|
||||
/// - parameter ack: The ack number.
|
||||
/// - parameter with: The data for this ack.
|
||||
open func emitAck(_ ack: Int, with items: [Any]) {
|
||||
guard status == .connected else { return }
|
||||
|
||||
let packet = SocketPacket.packetFromEmit(items, id: ack, nsp: nsp, ack: true)
|
||||
let str = packet.packetString
|
||||
|
||||
DefaultSocketLogger.Logger.log("Emitting Ack: \(str)", type: logType)
|
||||
|
||||
manager?.engine?.send(str, withData: packet.binary)
|
||||
emit(items, ack: ack, binary: true, isAck: true)
|
||||
}
|
||||
|
||||
/// Called when socket.io has acked one of our emits. Causes the corresponding ack callback to be called.
|
||||
|
||||
@@ -52,9 +52,14 @@ public enum SocketIOClientOption : ClientOption {
|
||||
|
||||
/// If passed `true`, the only transport that will be used will be WebSockets.
|
||||
case forceWebsockets(Bool)
|
||||
|
||||
/// If passed `true`, the WebSocket stream will be configured with the enableSOCKSProxy `true`.
|
||||
case enableSOCKSProxy(Bool)
|
||||
|
||||
/// The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||
/// called on.
|
||||
///
|
||||
/// **This should be a serial queue! Concurrent queues are not supported and might cause crashes and races**.
|
||||
case handleQueue(DispatchQueue)
|
||||
|
||||
/// If passed `true`, the client will log debug information. This should be turned off in production code.
|
||||
@@ -73,8 +78,14 @@ public enum SocketIOClientOption : ClientOption {
|
||||
/// 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)
|
||||
|
||||
/// The number of seconds to wait before reconnect attempts.
|
||||
/// The minimum number of seconds to wait before reconnect attempts.
|
||||
case reconnectWait(Int)
|
||||
|
||||
/// The maximum number of seconds to wait before reconnect attempts.
|
||||
case reconnectWaitMax(Int)
|
||||
|
||||
/// The randomization factor for calculating reconnect jitter.
|
||||
case randomizationFactor(Double)
|
||||
|
||||
/// Set `true` if your server is using secure transports.
|
||||
case secure(Bool)
|
||||
@@ -123,6 +134,10 @@ public enum SocketIOClientOption : ClientOption {
|
||||
description = "reconnectAttempts"
|
||||
case .reconnectWait:
|
||||
description = "reconnectWait"
|
||||
case .reconnectWaitMax:
|
||||
description = "reconnectWaitMax"
|
||||
case .randomizationFactor:
|
||||
description = "randomizationFactor"
|
||||
case .secure:
|
||||
description = "secure"
|
||||
case .selfSigned:
|
||||
@@ -131,6 +146,8 @@ public enum SocketIOClientOption : ClientOption {
|
||||
description = "security"
|
||||
case .sessionDelegate:
|
||||
description = "sessionDelegate"
|
||||
case .enableSOCKSProxy:
|
||||
description = "enableSOCKSProxy"
|
||||
}
|
||||
|
||||
return description
|
||||
@@ -168,6 +185,10 @@ public enum SocketIOClientOption : ClientOption {
|
||||
value = attempts
|
||||
case let .reconnectWait(wait):
|
||||
value = wait
|
||||
case let .reconnectWaitMax(wait):
|
||||
value = wait
|
||||
case let .randomizationFactor(factor):
|
||||
value = factor
|
||||
case let .secure(secure):
|
||||
value = secure
|
||||
case let .security(security):
|
||||
@@ -176,6 +197,8 @@ public enum SocketIOClientOption : ClientOption {
|
||||
value = signed
|
||||
case let .sessionDelegate(delegate):
|
||||
value = delegate
|
||||
case let .enableSOCKSProxy(enable):
|
||||
value = enable
|
||||
}
|
||||
|
||||
return value
|
||||
|
||||
@@ -26,7 +26,7 @@ import Dispatch
|
||||
import Foundation
|
||||
|
||||
/// Defines the interface for a SocketIOClient.
|
||||
public protocol SocketIOClientSpec : class {
|
||||
public protocol SocketIOClientSpec : AnyObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// A handler that will be called on any event.
|
||||
@@ -43,6 +43,17 @@ public protocol SocketIOClientSpec : class {
|
||||
/// **Must** start with a `/`.
|
||||
var nsp: String { get }
|
||||
|
||||
/// A view into this socket where emits do not check for binary data.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.rawEmitView.emit("myEvent", myObject)
|
||||
/// ```
|
||||
///
|
||||
/// **NOTE**: It is not safe to hold on to this view beyond the life of the socket.
|
||||
var rawEmitView: SocketRawView { get }
|
||||
|
||||
/// The status of this client.
|
||||
var status: SocketIOStatus { get }
|
||||
|
||||
@@ -81,14 +92,15 @@ public protocol SocketIOClientSpec : class {
|
||||
/// Disconnects the socket.
|
||||
func disconnect()
|
||||
|
||||
/// Send an event to the server, with optional data items.
|
||||
/// Send an event to the server, with optional data items and optional write completion handler.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. May be left out.
|
||||
func emit(_ event: String, _ items: SocketData...)
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
func emit(_ event: String, _ items: SocketData..., completion: (() -> ())?)
|
||||
|
||||
/// Call when you wish to tell the server that you've received the event for `ack`.
|
||||
///
|
||||
@@ -225,7 +237,7 @@ public protocol SocketIOClientSpec : class {
|
||||
|
||||
public extension SocketIOClientSpec {
|
||||
/// Default implementation.
|
||||
public func didError(reason: String) {
|
||||
func didError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("\(reason)", type: "SocketIOClient")
|
||||
|
||||
handleClientEvent(.error, data: [reason])
|
||||
@@ -315,6 +327,9 @@ public enum SocketClientEvent : String {
|
||||
|
||||
/// Emitted every time there is a change in the client's status.
|
||||
///
|
||||
/// The payload for data is [SocketIOClientStatus, Int]. Where the second item is the raw value. Use the second one
|
||||
/// if you are working in Objective-C.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
@@ -323,4 +338,16 @@ public enum SocketClientEvent : String {
|
||||
/// }
|
||||
/// ```
|
||||
case statusChange
|
||||
|
||||
/// Emitted when when upgrading the http connection to a websocket connection.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.on(clientEvent: .websocketUpgrade) {data, ack in
|
||||
/// let headers = (data as [Any])[0]
|
||||
/// // Some header logic
|
||||
/// }
|
||||
/// ```
|
||||
case websocketUpgrade
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// SocketRawView.swift
|
||||
// Socket.IO-Client-Swift
|
||||
//
|
||||
// Created by Erik Little on 3/30/18.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.rawEmitView.emit("myEvent", myObject)
|
||||
/// ```
|
||||
public final class SocketRawView : NSObject {
|
||||
private unowned let socket: SocketIOClient
|
||||
|
||||
init(socket: SocketIOClient) {
|
||||
self.socket = socket
|
||||
}
|
||||
|
||||
/// Send an event to the server, with optional data items.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. May be left out.
|
||||
public func emit(_ event: String, _ items: SocketData...) {
|
||||
do {
|
||||
try emit(event, with: items.map({ try $0.socketRepresentation() }))
|
||||
} catch {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: "SocketIOClient")
|
||||
|
||||
socket.handleClientEvent(.error, data: [event, items, error])
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as emit, but meant for Objective-C
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. Send an empty array to send no data.
|
||||
@objc
|
||||
public func emit(_ event: String, with items: [Any]) {
|
||||
socket.emit([event] + items, binary: false)
|
||||
}
|
||||
|
||||
/// Sends a message to the server, requesting 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.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// 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.
|
||||
public func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback {
|
||||
do {
|
||||
return emitWithAck(event, with: try items.map({ try $0.socketRepresentation() }))
|
||||
} catch {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: "SocketIOClient")
|
||||
|
||||
socket.handleClientEvent(.error, data: [event, items, error])
|
||||
|
||||
return OnAckCallback(ackNumber: -1, items: [], socket: socket)
|
||||
}
|
||||
}
|
||||
|
||||
/// 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 items: 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.
|
||||
@objc
|
||||
public func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {
|
||||
return socket.createOnAck([event] + items, binary: false)
|
||||
}
|
||||
}
|
||||
|
||||
/// Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.
|
||||
///
|
||||
/// Usage:
|
||||
///
|
||||
/// ```swift
|
||||
/// ack.rawEmitView.with(myObject)
|
||||
/// ```
|
||||
public final class SocketRawAckView : NSObject {
|
||||
private unowned let socket: SocketIOClient
|
||||
private let ackNum: Int
|
||||
|
||||
init(socket: SocketIOClient, ackNum: Int) {
|
||||
self.socket = socket
|
||||
self.ackNum = ackNum
|
||||
}
|
||||
|
||||
/// Call to ack receiving this event.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[ackNum, items, theError]`
|
||||
///
|
||||
/// - parameter items: A variable number of items to send when acking.
|
||||
public func with(_ items: SocketData...) {
|
||||
guard ackNum != -1 else { return }
|
||||
|
||||
do {
|
||||
socket.emit(try items.map({ try $0.socketRepresentation() }), ack: ackNum, binary: false, isAck: true)
|
||||
} catch {
|
||||
socket.handleClientEvent(.error, data: [ackNum, items, error])
|
||||
}
|
||||
}
|
||||
|
||||
/// Call to ack receiving this event.
|
||||
///
|
||||
/// - parameter items: An array of items to send when acking. Use `[]` to send nothing.
|
||||
@objc
|
||||
public func with(_ items: [Any]) {
|
||||
guard ackNum != -1 else { return }
|
||||
|
||||
socket.emit(items, ack: ackNum, binary: false, isAck: true)
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,7 @@ import Starscream
|
||||
|
||||
/// 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,
|
||||
ConfigSettable {
|
||||
open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket, ConfigSettable {
|
||||
// MARK: Properties
|
||||
|
||||
private static let logType = "SocketEngine"
|
||||
@@ -50,7 +49,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// A queue of engine.io messages waiting for POSTing
|
||||
///
|
||||
/// **You should not touch this directly**
|
||||
public var postWait = [String]()
|
||||
public var postWait = [Post]()
|
||||
|
||||
/// `true` if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to
|
||||
/// disconnect us.
|
||||
@@ -115,6 +114,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
@available(*, deprecated, message: "No longer needed, if we're not polling, then we must be doing websockets")
|
||||
public private(set) var websocket = false
|
||||
|
||||
/// When `true`, the WebSocket `stream` will be configured with the enableSOCKSProxy `true`.
|
||||
public private(set) var enableSOCKSProxy = false
|
||||
|
||||
/// The WebSocket for this engine.
|
||||
public private(set) var ws: WebSocket?
|
||||
|
||||
@@ -164,10 +166,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// - 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: [String: Any]?) {
|
||||
public required convenience init(client: SocketEngineClient, url: URL, options: [String: Any]?) {
|
||||
self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])
|
||||
}
|
||||
|
||||
/// :nodoc:
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("Engine is being released", type: SocketEngine.logType)
|
||||
closed = true
|
||||
@@ -214,7 +217,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
|
||||
/// Starts the connection to the server.
|
||||
public func connect() {
|
||||
open func connect() {
|
||||
engineQueue.async {
|
||||
self._connect()
|
||||
}
|
||||
@@ -224,7 +227,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
if connected {
|
||||
DefaultSocketLogger.Logger.error("Engine tried opening while connected. Assuming this was a reconnect",
|
||||
type: SocketEngine.logType)
|
||||
disconnect(reason: "reconnect")
|
||||
_disconnect(reason: "reconnect")
|
||||
}
|
||||
|
||||
DefaultSocketLogger.Logger.log("Starting engine. Server: \(url)", type: SocketEngine.logType)
|
||||
@@ -282,9 +285,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
private func createWebSocketAndConnect() {
|
||||
var req = URLRequest(url: urlWebSocketWithSid)
|
||||
|
||||
addHeaders(to: &req)
|
||||
addHeaders(to: &req, includingCookies: session?.configuration.httpCookieStorage?.cookies(for: urlPollingWithSid))
|
||||
|
||||
ws = WebSocket(request: req)
|
||||
let stream = FoundationStream()
|
||||
stream.enableSOCKSProxy = enableSOCKSProxy
|
||||
ws = WebSocket(request: req, stream: stream)
|
||||
ws?.callbackQueue = engineQueue
|
||||
ws?.enableCompression = compress
|
||||
ws?.disableSSLCertValidation = selfSigned
|
||||
@@ -314,11 +319,17 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
this.parseEngineMessage(message)
|
||||
}
|
||||
|
||||
ws?.onHttpResponseHeaders = {[weak self] headers in
|
||||
guard let this = self else { return }
|
||||
|
||||
this.client?.engineDidWebsocketUpgrade(headers: headers)
|
||||
}
|
||||
|
||||
ws?.connect()
|
||||
}
|
||||
|
||||
/// Called when an error happens during execution. Causes a disconnection.
|
||||
public func didError(reason: String) {
|
||||
open func didError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("\(reason)", type: SocketEngine.logType)
|
||||
client?.engineDidError(reason: reason)
|
||||
disconnect(reason: reason)
|
||||
@@ -327,7 +338,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// Disconnects from the server.
|
||||
///
|
||||
/// - parameter reason: The reason for the disconnection. This is communicated up to the client.
|
||||
public func disconnect(reason: String) {
|
||||
open func disconnect(reason: String) {
|
||||
engineQueue.async {
|
||||
self._disconnect(reason: reason)
|
||||
}
|
||||
@@ -341,7 +352,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
if polling {
|
||||
disconnectPolling(reason: reason)
|
||||
} else {
|
||||
sendWebSocketMessage("", withType: .close, withData: [])
|
||||
sendWebSocketMessage("", withType: .close, withData: [], completion: nil)
|
||||
closeOutEngine(reason: reason)
|
||||
}
|
||||
}
|
||||
@@ -349,7 +360,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
// We need to take special care when we're polling that we send it ASAP
|
||||
// Also make sure we're on the emitQueue since we're touching postWait
|
||||
private func disconnectPolling(reason: String) {
|
||||
postWait.append(String(SocketEnginePacketType.close.rawValue))
|
||||
postWait.append((String(SocketEnginePacketType.close.rawValue), {}))
|
||||
|
||||
doRequest(for: createRequestForPostWithPostWait()) {_, _, _ in }
|
||||
closeOutEngine(reason: reason)
|
||||
@@ -359,7 +370,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// WebSocket mode.
|
||||
///
|
||||
/// **You shouldn't call this directly**
|
||||
public func doFastUpgrade() {
|
||||
open func doFastUpgrade() {
|
||||
if waitingForPoll {
|
||||
DefaultSocketLogger.Logger.error("Outstanding poll when switched to WebSockets," +
|
||||
"we'll probably disconnect soon. You should report this.", type: SocketEngine.logType)
|
||||
@@ -367,36 +378,39 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
DefaultSocketLogger.Logger.log("Switching to WebSockets", type: SocketEngine.logType)
|
||||
|
||||
sendWebSocketMessage("", withType: .upgrade, withData: [])
|
||||
sendWebSocketMessage("", withType: .upgrade, withData: [], completion: nil)
|
||||
polling = false
|
||||
fastUpgrade = false
|
||||
probing = false
|
||||
flushProbeWait()
|
||||
|
||||
// Need to flush postWait to socket since it connected successfully
|
||||
// moved from flushProbeWait() since it is also called on connected failure, and we don't want to try and send
|
||||
// packets through WebSockets when WebSockets has failed!
|
||||
if !postWait.isEmpty {
|
||||
flushWaitingForPostToWebSocket()
|
||||
}
|
||||
}
|
||||
|
||||
private func flushProbeWait() {
|
||||
DefaultSocketLogger.Logger.log("Flushing probe wait", type: SocketEngine.logType)
|
||||
|
||||
for waiter in probeWait {
|
||||
write(waiter.msg, withType: waiter.type, withData: waiter.data)
|
||||
write(waiter.msg, withType: waiter.type, withData: waiter.data, completion: waiter.completion)
|
||||
}
|
||||
|
||||
probeWait.removeAll(keepingCapacity: false)
|
||||
|
||||
if postWait.count != 0 {
|
||||
flushWaitingForPostToWebSocket()
|
||||
}
|
||||
}
|
||||
|
||||
/// 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**
|
||||
public func flushWaitingForPostToWebSocket() {
|
||||
open func flushWaitingForPostToWebSocket() {
|
||||
guard let ws = self.ws else { return }
|
||||
|
||||
for msg in postWait {
|
||||
ws.write(string: msg)
|
||||
ws.write(string: msg.msg, completion: msg.completion)
|
||||
}
|
||||
|
||||
postWait.removeAll(keepingCapacity: false)
|
||||
@@ -474,7 +488,7 @@ 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) {
|
||||
open func parseEngineData(_ data: Data) {
|
||||
DefaultSocketLogger.Logger.log("Got binary data: \(data)", type: SocketEngine.logType)
|
||||
|
||||
client?.parseEngineBinaryData(data.subdata(in: 1..<data.endIndex))
|
||||
@@ -483,7 +497,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// Parses a raw engine.io packet.
|
||||
///
|
||||
/// - parameter message: The message to parse.
|
||||
public func parseEngineMessage(_ message: String) {
|
||||
open func parseEngineMessage(_ message: String) {
|
||||
DefaultSocketLogger.Logger.log("Got message: \(message)", type: SocketEngine.logType)
|
||||
|
||||
let reader = SocketStringReader(message: message)
|
||||
@@ -536,15 +550,14 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
// Server is not responding
|
||||
if pongsMissed > pongsMissedMax {
|
||||
client?.engineDidClose(reason: "Ping timeout")
|
||||
|
||||
closeOutEngine(reason: "Ping timeout")
|
||||
return
|
||||
}
|
||||
|
||||
pongsMissed += 1
|
||||
write("", withType: .ping, withData: [])
|
||||
write("", withType: .ping, withData: [], completion: nil)
|
||||
|
||||
engineQueue.asyncAfter(deadline: DispatchTime.now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
|
||||
engineQueue.asyncAfter(deadline: .now() + .milliseconds(pingInterval)) {[weak self, id = self.sid] in
|
||||
// Make sure not to ping old connections
|
||||
guard let this = self, this.sid == id else { return }
|
||||
|
||||
@@ -586,6 +599,8 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
self.security = security
|
||||
case .compress:
|
||||
self.compress = true
|
||||
case .enableSOCKSProxy:
|
||||
self.enableSOCKSProxy = true
|
||||
default:
|
||||
continue
|
||||
}
|
||||
@@ -598,7 +613,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
DefaultSocketLogger.Logger.log("Upgrading transport to WebSockets", type: SocketEngine.logType)
|
||||
|
||||
fastUpgrade = true
|
||||
sendPollMessage("", withType: .noop, withData: [])
|
||||
sendPollMessage("", withType: .noop, withData: [], completion: nil)
|
||||
// After this point, we should not send anymore polling messages
|
||||
}
|
||||
}
|
||||
@@ -608,11 +623,15 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// - parameter msg: The message to send.
|
||||
/// - parameter type: The type of this message.
|
||||
/// - parameter data: Any data that this message has.
|
||||
public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) {
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
open func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data], completion: (() -> ())? = nil) {
|
||||
engineQueue.async {
|
||||
guard self.connected else { return }
|
||||
guard self.connected else {
|
||||
completion?()
|
||||
return
|
||||
}
|
||||
guard !self.probing else {
|
||||
self.probeWait.append((msg, type, data))
|
||||
self.probeWait.append((msg, type, data, completion))
|
||||
|
||||
return
|
||||
}
|
||||
@@ -620,11 +639,11 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
if self.polling {
|
||||
DefaultSocketLogger.Logger.log("Writing poll: \(msg) has data: \(data.count != 0)",
|
||||
type: SocketEngine.logType)
|
||||
self.sendPollMessage(msg, withType: type, withData: data)
|
||||
self.sendPollMessage(msg, withType: type, withData: data, completion: completion)
|
||||
} else {
|
||||
DefaultSocketLogger.Logger.log("Writing ws: \(msg) has data: \(data.count != 0)",
|
||||
type: SocketEngine.logType)
|
||||
self.sendWebSocketMessage(msg, withType: type, withData: data)
|
||||
self.sendWebSocketMessage(msg, withType: type, withData: data, completion: completion)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -660,7 +679,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
connected = false
|
||||
polling = true
|
||||
|
||||
if let reason = error?.localizedDescription {
|
||||
if let error = error as? WSError {
|
||||
didError(reason: "\(error.message). code=\(error.code), type=\(error.type)")
|
||||
} else if let reason = error?.localizedDescription {
|
||||
didError(reason: reason)
|
||||
} else {
|
||||
client?.engineDidClose(reason: "Socket Disconnected")
|
||||
|
||||
@@ -59,4 +59,9 @@ import Foundation
|
||||
///
|
||||
/// - parameter data: The data the engine received.
|
||||
func parseEngineBinaryData(_ data: Data)
|
||||
|
||||
/// Called when when upgrading the http connection to a websocket connection.
|
||||
///
|
||||
/// - parameter headers: The http headers.
|
||||
func engineDidWebsocketUpgrade(headers: [String: String])
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public protocol SocketEnginePollable : SocketEngineSpec {
|
||||
/// A queue of engine.io messages waiting for POSTing
|
||||
///
|
||||
/// **You should not touch this directly**
|
||||
var postWait: [String] { get set }
|
||||
var postWait: [Post] { get set }
|
||||
|
||||
/// The URLSession that will be used for polling.
|
||||
var session: URLSession? { get }
|
||||
@@ -65,7 +65,7 @@ public protocol SocketEnginePollable : SocketEngineSpec {
|
||||
/// - 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], completion: (() -> ())?)
|
||||
|
||||
/// Call to stop polling and invalidate the URLSession.
|
||||
func stopPolling()
|
||||
@@ -74,12 +74,15 @@ public protocol SocketEnginePollable : SocketEngineSpec {
|
||||
// Default polling methods
|
||||
extension SocketEnginePollable {
|
||||
func createRequestForPostWithPostWait() -> URLRequest {
|
||||
defer { postWait.removeAll(keepingCapacity: true) }
|
||||
defer {
|
||||
for packet in postWait { packet.completion?() }
|
||||
postWait.removeAll(keepingCapacity: true)
|
||||
}
|
||||
|
||||
var postStr = ""
|
||||
|
||||
for packet in postWait {
|
||||
postStr += "\(packet.utf16.count):\(packet)"
|
||||
postStr += "\(packet.msg.utf16.count):\(packet.msg)"
|
||||
}
|
||||
|
||||
DefaultSocketLogger.Logger.log("Created POST string: \(postStr)", type: "SocketEnginePolling")
|
||||
@@ -122,9 +125,12 @@ extension SocketEnginePollable {
|
||||
|
||||
doRequest(for: req) {[weak self] data, res, err in
|
||||
guard let this = self, this.polling else { return }
|
||||
|
||||
if err != nil || data == nil {
|
||||
DefaultSocketLogger.Logger.error(err?.localizedDescription ?? "Error", type: "SocketEnginePolling")
|
||||
guard let data = data, let res = res as? HTTPURLResponse, res.statusCode == 200 else {
|
||||
if let err = err {
|
||||
DefaultSocketLogger.Logger.error(err.localizedDescription, type: "SocketEnginePolling")
|
||||
} else {
|
||||
DefaultSocketLogger.Logger.error("Error during long poll request", type: "SocketEnginePolling")
|
||||
}
|
||||
|
||||
if this.polling {
|
||||
this.didError(reason: err?.localizedDescription ?? "Error")
|
||||
@@ -135,7 +141,7 @@ extension SocketEnginePollable {
|
||||
|
||||
DefaultSocketLogger.Logger.log("Got polling response", type: "SocketEnginePolling")
|
||||
|
||||
if let str = String(data: data!, encoding: .utf8) {
|
||||
if let str = String(data: data, encoding: .utf8) {
|
||||
this.parsePollingMessage(str)
|
||||
}
|
||||
|
||||
@@ -163,11 +169,14 @@ extension SocketEnginePollable {
|
||||
|
||||
DefaultSocketLogger.Logger.log("POSTing", type: "SocketEnginePolling")
|
||||
|
||||
doRequest(for: req) {[weak self] data, res, err in
|
||||
doRequest(for: req) {[weak self] _, res, err in
|
||||
guard let this = self else { return }
|
||||
|
||||
if err != nil {
|
||||
DefaultSocketLogger.Logger.error(err?.localizedDescription ?? "Error", type: "SocketEnginePolling")
|
||||
guard let res = res as? HTTPURLResponse, res.statusCode == 200 else {
|
||||
if let err = err {
|
||||
DefaultSocketLogger.Logger.error(err.localizedDescription, type: "SocketEnginePolling")
|
||||
} else {
|
||||
DefaultSocketLogger.Logger.error("Error flushing waiting posts", type: "SocketEnginePolling")
|
||||
}
|
||||
|
||||
if this.polling {
|
||||
this.didError(reason: err?.localizedDescription ?? "Error")
|
||||
@@ -209,14 +218,15 @@ extension SocketEnginePollable {
|
||||
/// - 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]) {
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
public func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data], completion: (() -> ())? = nil) {
|
||||
DefaultSocketLogger.Logger.log("Sending poll: \(message) as type: \(type.rawValue)", type: "SocketEnginePolling")
|
||||
|
||||
postWait.append(String(type.rawValue) + message)
|
||||
postWait.append((String(type.rawValue) + message, completion))
|
||||
|
||||
for data in datas {
|
||||
if case let .right(bin) = createBinaryDataForSend(using: data) {
|
||||
postWait.append(bin)
|
||||
postWait.append((bin, {}))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,8 @@ import Starscream
|
||||
/// - parameter msg: The message to send.
|
||||
/// - parameter type: The type of this message.
|
||||
/// - parameter data: Any data that this message has.
|
||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data], completion: (() -> ())?)
|
||||
}
|
||||
|
||||
extension SocketEngineSpec {
|
||||
@@ -155,9 +156,12 @@ extension SocketEngineSpec {
|
||||
return com.url!
|
||||
}
|
||||
|
||||
func addHeaders(to req: inout URLRequest) {
|
||||
if let cookies = cookies {
|
||||
req.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookies)
|
||||
func addHeaders(to req: inout URLRequest, includingCookies additionalCookies: [HTTPCookie]? = nil) {
|
||||
var cookiesToAdd: [HTTPCookie] = cookies ?? []
|
||||
cookiesToAdd += additionalCookies ?? []
|
||||
|
||||
if !cookiesToAdd.isEmpty {
|
||||
req.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookiesToAdd)
|
||||
}
|
||||
|
||||
if let extraHeaders = extraHeaders {
|
||||
@@ -171,12 +175,12 @@ extension SocketEngineSpec {
|
||||
if polling {
|
||||
return .right("b4" + data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)))
|
||||
} else {
|
||||
return .left(Data(bytes: [0x4]) + data)
|
||||
return .left(Data([0x4]) + data)
|
||||
}
|
||||
}
|
||||
|
||||
/// Send an engine message (4)
|
||||
func send(_ msg: String, withData datas: [Data]) {
|
||||
write(msg, withType: .message, withData: datas)
|
||||
func send(_ msg: String, withData datas: [Data], completion: (() -> ())? = nil) {
|
||||
write(msg, withType: .message, withData: datas, completion: completion)
|
||||
}
|
||||
}
|
||||
@@ -37,14 +37,18 @@ public protocol SocketEngineWebsocket : SocketEngineSpec {
|
||||
/// - 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])
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
func sendWebSocketMessage(_ str: String,
|
||||
withType type: SocketEnginePacketType,
|
||||
withData datas: [Data],
|
||||
completion: (() -> ())?)
|
||||
}
|
||||
|
||||
// WebSocket methods
|
||||
extension SocketEngineWebsocket {
|
||||
func probeWebSocket() {
|
||||
if ws?.isConnected ?? false {
|
||||
sendWebSocketMessage("probe", withType: .ping, withData: [])
|
||||
sendWebSocketMessage("probe", withType: .ping, withData: [], completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,14 +59,23 @@ extension SocketEngineWebsocket {
|
||||
/// - 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]) {
|
||||
/// - parameter completion: Callback called on transport write completion.
|
||||
public func sendWebSocketMessage(_ str: String,
|
||||
withType type: SocketEnginePacketType,
|
||||
withData data: [Data],
|
||||
completion: (() -> ())?
|
||||
) {
|
||||
DefaultSocketLogger.Logger.log("Sending ws: \(str) as type: \(type.rawValue)", type: "SocketEngineWebSocket")
|
||||
|
||||
ws?.write(string: "\(type.rawValue)\(str)")
|
||||
|
||||
for data in datas {
|
||||
if case let .left(bin) = createBinaryDataForSend(using: data) {
|
||||
ws?.write(data: bin)
|
||||
if data.count == 0 {
|
||||
completion?()
|
||||
}
|
||||
|
||||
for item in data {
|
||||
if case let .left(bin) = createBinaryDataForSend(using: item) {
|
||||
ws?.write(data: bin, completion: completion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ import Foundation
|
||||
/// To disconnect a socket and remove it from the manager, either call `SocketIOClient.disconnect()` on the socket,
|
||||
/// or call one of the `disconnectSocket` methods on this class.
|
||||
///
|
||||
/// **NOTE**: The manager is not thread/queue safe, all interaction with the manager should be done on the `handleQueue`
|
||||
///
|
||||
open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDataBufferable, ConfigSettable {
|
||||
private static let logType = "SocketManager"
|
||||
|
||||
@@ -95,9 +97,15 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
/// If `true`, this client will try and reconnect on any disconnects.
|
||||
public var reconnects = true
|
||||
|
||||
/// The number of seconds to wait before attempting to reconnect.
|
||||
/// The minimum number of seconds to wait before attempting to reconnect.
|
||||
public var reconnectWait = 10
|
||||
|
||||
/// The maximum number of seconds to wait before attempting to reconnect.
|
||||
public var reconnectWaitMax = 30
|
||||
|
||||
/// The randomization factor for calculating reconnect jitter.
|
||||
public var randomizationFactor = 0.5
|
||||
|
||||
/// The status of this manager.
|
||||
public private(set) var status: SocketIOStatus = .notConnected {
|
||||
didSet {
|
||||
@@ -135,10 +143,6 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
self._config = config
|
||||
self.socketURL = socketURL
|
||||
|
||||
if socketURL.absoluteString.hasPrefix("https://") {
|
||||
self._config.insert(.secure(true))
|
||||
}
|
||||
|
||||
super.init()
|
||||
|
||||
setConfigs(_config)
|
||||
@@ -154,6 +158,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
self.init(socketURL: socketURL, config: config?.toSocketConfiguration() ?? [])
|
||||
}
|
||||
|
||||
/// :nodoc:
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("Manager is being released", type: SocketManager.logType)
|
||||
|
||||
@@ -167,6 +172,9 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
|
||||
engine?.engineQueue.sync {
|
||||
self.engine?.client = nil
|
||||
|
||||
// Close old engine so it will not leak because of URLSession if in polling mode
|
||||
self.engine?.disconnect(reason: "Adding new engine")
|
||||
}
|
||||
|
||||
engine = SocketEngine(client: self, url: socketURL, config: config)
|
||||
@@ -285,7 +293,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
/// - parameter items: The data to send with this event.
|
||||
open func emitAll(_ event: String, withItems items: [Any]) {
|
||||
forAll {socket in
|
||||
socket.emit(event, with: items)
|
||||
socket.emit(event, with: items, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,6 +384,18 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
}
|
||||
}
|
||||
|
||||
/// Called when when upgrading the http connection to a websocket connection.
|
||||
///
|
||||
/// - parameter headers: The http headers.
|
||||
open func engineDidWebsocketUpgrade(headers: [String: String]) {
|
||||
handleQueue.async {
|
||||
self._engineDidWebsocketUpgrade(headers: headers)
|
||||
}
|
||||
}
|
||||
private func _engineDidWebsocketUpgrade(headers: [String: String]) {
|
||||
emitAll(clientEvent: .websocketUpgrade, data: [headers])
|
||||
}
|
||||
|
||||
/// Called when the engine has a message that must be parsed.
|
||||
///
|
||||
/// - parameter msg: The message that needs parsing.
|
||||
@@ -387,7 +407,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
|
||||
private func _parseEngineMessage(_ msg: String) {
|
||||
guard let packet = parseSocketMessage(msg) else { return }
|
||||
guard packet.type != .binaryAck && packet.type != .binaryEvent else {
|
||||
guard !packet.type.isBinary else {
|
||||
waitingPackets.append(packet)
|
||||
|
||||
return
|
||||
@@ -461,7 +481,21 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
currentReconnectAttempt += 1
|
||||
connect()
|
||||
|
||||
handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(reconnectWait), execute: _tryReconnect)
|
||||
let interval = reconnectInterval(attempts: currentReconnectAttempt)
|
||||
DefaultSocketLogger.Logger.log("Scheduling reconnect in \(interval)s", type: SocketManager.logType)
|
||||
handleQueue.asyncAfter(deadline: DispatchTime.now() + interval, execute: _tryReconnect)
|
||||
}
|
||||
|
||||
func reconnectInterval(attempts: Int) -> Double {
|
||||
// apply exponential factor
|
||||
let backoffFactor = pow(1.5, attempts)
|
||||
let interval = Double(reconnectWait) * Double(truncating: backoffFactor as NSNumber)
|
||||
// add in a random factor smooth thundering herds
|
||||
let rand = Double.random(in: 0 ..< 1)
|
||||
let randomFactor = rand * randomizationFactor * Double(truncating: interval as NSNumber)
|
||||
// add in random factor, and clamp to min and max values
|
||||
let combined = interval + randomFactor
|
||||
return Double(fmax(Double(reconnectWait), fmin(combined, Double(reconnectWaitMax))))
|
||||
}
|
||||
|
||||
/// Sets manager specific configs.
|
||||
@@ -476,18 +510,29 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
||||
self.handleQueue = queue
|
||||
case let .reconnects(reconnects):
|
||||
self.reconnects = reconnects
|
||||
case let .reconnectAttempts(attempts):
|
||||
self.reconnectAttempts = attempts
|
||||
case let .reconnectWait(wait):
|
||||
reconnectWait = abs(wait)
|
||||
case let .reconnectWaitMax(wait):
|
||||
reconnectWaitMax = abs(wait)
|
||||
case let .randomizationFactor(factor):
|
||||
randomizationFactor = factor
|
||||
case let .log(log):
|
||||
DefaultSocketLogger.Logger.log = log
|
||||
case let .logger(logger):
|
||||
DefaultSocketLogger.Logger = logger
|
||||
default:
|
||||
case _:
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
_config = config
|
||||
|
||||
if socketURL.absoluteString.hasPrefix("https://") {
|
||||
_config.insert(.secure(true))
|
||||
}
|
||||
|
||||
_config.insert(.path("/socket.io/"), replacing: false)
|
||||
|
||||
// If `ConfigSettable` & `SocketEngineSpec`, update its configs.
|
||||
|
||||
@@ -46,7 +46,7 @@ import Foundation
|
||||
/// or call one of the `disconnectSocket` methods on this class.
|
||||
///
|
||||
@objc
|
||||
public protocol SocketManagerSpec : class, SocketEngineClient {
|
||||
public protocol SocketManagerSpec : AnyObject, SocketEngineClient {
|
||||
// MARK: Properties
|
||||
|
||||
/// Returns the socket associated with the default namespace ("/").
|
||||
@@ -69,8 +69,14 @@ public protocol SocketManagerSpec : class, SocketEngineClient {
|
||||
/// If `true`, this manager will try and reconnect on any disconnects.
|
||||
var reconnects: Bool { get set }
|
||||
|
||||
/// The number of seconds to wait before attempting to reconnect.
|
||||
/// The minimum number of seconds to wait before attempting to reconnect.
|
||||
var reconnectWait: Int { get set }
|
||||
|
||||
/// The maximum number of seconds to wait before attempting to reconnect.
|
||||
var reconnectWaitMax: Int { get set }
|
||||
|
||||
/// The randomization factor for calculating reconnect jitter.
|
||||
var randomizationFactor: Double { get set }
|
||||
|
||||
/// The URL of the socket.io server.
|
||||
var socketURL: URL { get }
|
||||
|
||||
@@ -116,7 +116,7 @@ public struct SocketPacket : CustomStringConvertible {
|
||||
private func createPacketString() -> String {
|
||||
let typeString = String(type.rawValue)
|
||||
// Binary count?
|
||||
let binaryCountString = typeString + (type == .binaryEvent || type == .binaryAck ? "\(String(binary.count))-" : "")
|
||||
let binaryCountString = typeString + (type.isBinary ? "\(String(binary.count))-" : "")
|
||||
// Namespace?
|
||||
let nspString = binaryCountString + (nsp != "/" ? "\(nsp)," : "")
|
||||
// Ack number?
|
||||
@@ -158,7 +158,7 @@ public extension SocketPacket {
|
||||
// MARK: PacketType enum
|
||||
|
||||
/// The type of packets.
|
||||
public enum PacketType: Int {
|
||||
enum PacketType: Int {
|
||||
// MARK: Cases
|
||||
|
||||
/// Connect: 0
|
||||
@@ -181,6 +181,13 @@ public extension SocketPacket {
|
||||
|
||||
/// Binary Ack: 6
|
||||
case binaryAck
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// Whether or not this type is binary
|
||||
public var isBinary: Bool {
|
||||
return self == .binaryAck || self == .binaryEvent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,11 +207,15 @@ extension SocketPacket {
|
||||
}
|
||||
}
|
||||
|
||||
static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool) -> SocketPacket {
|
||||
let (parsedData, binary) = deconstructData(items)
|
||||
static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool, checkForBinary: Bool = true) -> SocketPacket {
|
||||
if checkForBinary {
|
||||
let (parsedData, binary) = deconstructData(items)
|
||||
|
||||
return SocketPacket(type: findType(binary.count, ack: ack), data: parsedData, id: id, nsp: nsp,
|
||||
binary: binary)
|
||||
return SocketPacket(type: findType(binary.count, ack: ack), data: parsedData, id: id, nsp: nsp,
|
||||
binary: binary)
|
||||
} else {
|
||||
return SocketPacket(type: findType(0, ack: ack), data: items, id: id, nsp: nsp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
import Foundation
|
||||
|
||||
/// Defines that a type will be able to parse socket.io-protocol messages.
|
||||
public protocol SocketParsable : class {
|
||||
public protocol SocketParsable : AnyObject {
|
||||
// MARK: Methods
|
||||
|
||||
/// Called when the engine has received some binary data that should be attached to a packet.
|
||||
@@ -57,7 +57,7 @@ public enum SocketParsableError : Error {
|
||||
}
|
||||
|
||||
/// Says that a type will be able to buffer binary data before all data for an event has come in.
|
||||
public protocol SocketDataBufferable : class {
|
||||
public protocol SocketDataBufferable : AnyObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// A list of packets that are waiting for binary data.
|
||||
@@ -77,7 +77,7 @@ public extension SocketParsable where Self: SocketManagerSpec & SocketDataBuffer
|
||||
internal func parseString(_ message: String) throws -> SocketPacket {
|
||||
var reader = SocketStringReader(message: message)
|
||||
|
||||
guard let type = Int(reader.read(count: 1)).flatMap({ SocketPacket.PacketType(rawValue: $0) }) else {
|
||||
guard let type = Int(reader.read(count: 1)).flatMap({ SocketPacket.PacketType(rawValue: $0) }) else {
|
||||
throw SocketParsableError.invalidPacketType
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public extension SocketParsable where Self: SocketManagerSpec & SocketDataBuffer
|
||||
var namespace = "/"
|
||||
var placeholders = -1
|
||||
|
||||
if type == .binaryEvent || type == .binaryAck {
|
||||
if type.isBinary {
|
||||
if let holders = Int(reader.readUntilOccurence(of: "-")) {
|
||||
placeholders = holders
|
||||
} else {
|
||||
@@ -109,14 +109,11 @@ public extension SocketParsable where Self: SocketManagerSpec & SocketDataBuffer
|
||||
if type == .error {
|
||||
reader.advance(by: -1)
|
||||
} else {
|
||||
while reader.hasNext {
|
||||
if let int = Int(reader.read(count: 1)) {
|
||||
idString += String(int)
|
||||
} else {
|
||||
reader.advance(by: -2)
|
||||
break
|
||||
}
|
||||
while let int = Int(reader.read(count: 1)) {
|
||||
idString += String(int)
|
||||
}
|
||||
|
||||
reader.advance(by: -2)
|
||||
}
|
||||
|
||||
var dataArray = String(message.utf16[message.utf16.index(reader.currentIndex, offsetBy: 1)...])!
|
||||
@@ -143,7 +140,7 @@ public extension SocketParsable where Self: SocketManagerSpec & SocketDataBuffer
|
||||
///
|
||||
/// - parameter message: The string that needs parsing.
|
||||
/// - returns: A completed socket packet or nil if the packet is invalid.
|
||||
public func parseSocketMessage(_ message: String) -> SocketPacket? {
|
||||
func parseSocketMessage(_ message: String) -> SocketPacket? {
|
||||
guard !message.isEmpty else { return nil }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Parsing \(message)", type: "SocketParser")
|
||||
@@ -169,7 +166,7 @@ public extension SocketParsable where Self: SocketManagerSpec & SocketDataBuffer
|
||||
///
|
||||
/// - parameter data: The data that should be attached to a packet.
|
||||
/// - returns: A completed socket packet if there is no more data left to collect.
|
||||
public func parseBinaryData(_ data: Data) -> SocketPacket? {
|
||||
func parseBinaryData(_ data: Data) -> SocketPacket? {
|
||||
guard !waitingPackets.isEmpty else {
|
||||
DefaultSocketLogger.Logger.error("Got data when not remaking packet", type: "SocketParser")
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ extension Array {
|
||||
|
||||
extension CharacterSet {
|
||||
static var allowedURLCharacterSet: CharacterSet {
|
||||
return CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[]\" {}^").inverted
|
||||
return CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[]\" {}^|").inverted
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,10 @@ extension Dictionary where Key == String, Value == Any {
|
||||
return .reconnectAttempts(attempts)
|
||||
case let ("reconnectWait", wait as Int):
|
||||
return .reconnectWait(wait)
|
||||
case let ("reconnectWaitMax", wait as Int):
|
||||
return .reconnectWaitMax(wait)
|
||||
case let ("randomizationFactor", factor as Double):
|
||||
return .randomizationFactor(factor)
|
||||
case let ("secure", secure as Bool):
|
||||
return .secure(secure)
|
||||
case let ("security", security as SSLSecurity):
|
||||
@@ -81,6 +85,8 @@ extension Dictionary where Key == String, Value == Any {
|
||||
return .sessionDelegate(delegate)
|
||||
case let ("compress", compress as Bool):
|
||||
return compress ? .compress : nil
|
||||
case let ("enableSOCKSProxy", enable as Bool):
|
||||
return .enableSOCKSProxy(enable)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import Foundation
|
||||
|
||||
/// Represents a class will log client events.
|
||||
public protocol SocketLogger : class {
|
||||
public protocol SocketLogger : AnyObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// Whether to log or not
|
||||
@@ -51,17 +51,19 @@ public protocol SocketLogger : class {
|
||||
public extension SocketLogger {
|
||||
/// Default implementation.
|
||||
func log(_ message: @autoclosure () -> String, type: String) {
|
||||
abstractLog("LOG", message: message, type: type)
|
||||
guard log else { return }
|
||||
|
||||
abstractLog("LOG", message: message(), type: type)
|
||||
}
|
||||
|
||||
/// Default implementation.
|
||||
func error(_ message: @autoclosure () -> String, type: String) {
|
||||
abstractLog("ERROR", message: message, type: type)
|
||||
guard log else { return }
|
||||
|
||||
abstractLog("ERROR", message: message(), type: type)
|
||||
}
|
||||
|
||||
private func abstractLog(_ logType: String, message: @autoclosure () -> String, type: String) {
|
||||
guard log else { return }
|
||||
|
||||
NSLog("\(logType) \(type): %@", message())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ struct SocketStringReader {
|
||||
mutating func readUntilOccurence(of string: String) -> String {
|
||||
let substring = message.utf16[currentIndex...]
|
||||
|
||||
guard let foundIndex = substring.index(of: string.utf16.first!) else {
|
||||
guard let foundIndex = substring.firstIndex(where: { $0 == string.utf16.first! }) else {
|
||||
currentIndex = message.utf16.endIndex
|
||||
|
||||
return String(substring)!
|
||||
|
||||
@@ -73,8 +73,11 @@ public typealias AckCallback = ([Any]) -> ()
|
||||
/// A typealias for a normal callback.
|
||||
public typealias NormalCallback = ([Any], SocketAckEmitter) -> ()
|
||||
|
||||
/// A typealias for a queued POST
|
||||
public typealias Post = (msg: String, completion: (() -> ())?)
|
||||
|
||||
typealias JSON = [String: Any]
|
||||
typealias Probe = (msg: String, type: SocketEnginePacketType, data: [Data])
|
||||
typealias Probe = (msg: String, type: SocketEnginePacketType, data: [Data], completion: (() -> ())?)
|
||||
typealias ProbeWaitQueue = [Probe]
|
||||
|
||||
enum Either<E, V> {
|
||||
|
||||
@@ -9,143 +9,180 @@
|
||||
import XCTest
|
||||
@testable import SocketIO
|
||||
|
||||
class SocketBasicPacketTest: XCTestCase {
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
|
||||
func testEmpyEmit() {
|
||||
let expectedSendString = "2[\"test\"]"
|
||||
class SocketBasicPacketTest : XCTestCase {
|
||||
func testEmptyEmit() {
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testNullEmit() {
|
||||
let expectedSendString = "2[\"test\",null]"
|
||||
let sendData: [Any] = ["test", NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testStringEmit() {
|
||||
let expectedSendString = "2[\"test\",\"foo bar\"]"
|
||||
let sendData = ["test", "foo bar"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testStringEmitWithQuotes() {
|
||||
let expectedSendString = "2[\"test\",\"\\\"he\\\"llo world\\\"\"]"
|
||||
let sendData = ["test", "\"he\"llo world\""]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testJSONEmit() {
|
||||
let expectedSendString = "2[\"test\",{\"null\":null,\"hello\":1,\"test\":\"hello\",\"foobar\":true}]"
|
||||
let sendData: [Any] = ["test", ["foobar": true, "hello": 1, "test": "hello", "null": NSNull()]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testArrayEmit() {
|
||||
let expectedSendString = "2[\"test\",[\"hello\",1,{\"test\":\"test\"}]]"
|
||||
let sendData: [Any] = ["test", ["hello", 1, ["test": "test"]]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testBinaryEmit() {
|
||||
let expectedSendString = "51-[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
"test",
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
}
|
||||
|
||||
func testMultipleBinaryEmit() {
|
||||
let expectedSendString = "52-[\"test\",{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData: [Any] = ["test", ["data1": data, "data2": data2] as NSDictionary]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
|
||||
let binaryObj = parsed.data[1] as! [String: Any]
|
||||
let data1Loc = (binaryObj["data1"] as! [String: Any])["num"] as! Int
|
||||
let data2Loc = (binaryObj["data2"] as! [String: Any])["num"] as! Int
|
||||
|
||||
XCTAssertEqual(packet.binary[data1Loc], data)
|
||||
XCTAssertEqual(packet.binary[data2Loc], data2)
|
||||
}
|
||||
|
||||
func testEmitWithAck() {
|
||||
let expectedSendString = "20[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: false)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: false).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString,
|
||||
|
||||
expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testEmitDataWithAck() {
|
||||
let expectedSendString = "51-0[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: false)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
"test",
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
}
|
||||
|
||||
// Acks
|
||||
func testEmptyAck() {
|
||||
let expectedSendString = "30[]"
|
||||
let packet = SocketPacket.packetFromEmit([], id: 0, nsp: "/", ack: true)
|
||||
let packetStr = SocketPacket.packetFromEmit([], id: 0, nsp: "/", ack: true).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: []))
|
||||
}
|
||||
|
||||
func testNullAck() {
|
||||
let expectedSendString = "30[null]"
|
||||
let sendData = [NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testStringAck() {
|
||||
let expectedSendString = "30[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testJSONAck() {
|
||||
let expectedSendString = "30[{\"null\":null,\"hello\":1,\"test\":\"hello\",\"foobar\":true}]"
|
||||
let sendData = [["foobar": true, "hello": 1, "test": "hello", "null": NSNull()]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
let packetStr = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true).packetString
|
||||
let parsed = parser.parseSocketMessage(packetStr)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
func testBinaryAck() {
|
||||
let expectedSendString = "61-0[{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData = [data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(parsed.type, .binaryAck)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
}
|
||||
|
||||
func testMultipleBinaryAck() {
|
||||
let expectedSendString = "62-0[{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData = [["data1": data, "data2": data2]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertEqual(parsed.type, .binaryAck)
|
||||
|
||||
let binaryObj = parsed.data[0] as! [String: Any]
|
||||
let data1Loc = (binaryObj["data1"] as! [String: Any])["num"] as! Int
|
||||
let data2Loc = (binaryObj["data2"] as! [String: Any])["num"] as! Int
|
||||
|
||||
XCTAssertEqual(packet.binary[data1Loc], data)
|
||||
XCTAssertEqual(packet.binary[data2Loc], data2)
|
||||
}
|
||||
|
||||
func testBinaryStringPlaceholderInMessage() {
|
||||
@@ -159,4 +196,20 @@ class SocketBasicPacketTest: XCTestCase {
|
||||
_ = packet.addData(data2)
|
||||
XCTAssertEqual(packet.args[0] as? String, "~~0")
|
||||
}
|
||||
|
||||
private func compareAnyArray(input: [Any], expected: [Any]) -> Bool {
|
||||
guard input.count == expected.count else { return false }
|
||||
|
||||
return (input as NSArray).isEqual(to: expected)
|
||||
}
|
||||
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
var parser: SocketParsable!
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
parser = SocketManager(socketURL: URL(string: "http://localhost")!)
|
||||
}
|
||||
}
|
||||
@@ -87,11 +87,11 @@ class SocketEngineTest: XCTestCase {
|
||||
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&created=2016-05-04T18%3A31%3A15%2B0200")
|
||||
|
||||
engine.connectParams = [
|
||||
"forbidden": "!*'();:@&=+$,/?%#[]\" {}^"
|
||||
"forbidden": "!*'();:@&=+$,/?%#[]\" {}^|"
|
||||
]
|
||||
|
||||
XCTAssertEqual(engine.urlPolling.query, "transport=polling&b64=1&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E")
|
||||
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E")
|
||||
XCTAssertEqual(engine.urlPolling.query, "transport=polling&b64=1&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E%7C")
|
||||
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E%7C")
|
||||
}
|
||||
|
||||
func testBase64Data() {
|
||||
|
||||
@@ -15,9 +15,36 @@ class SocketMangerTest : XCTestCase {
|
||||
XCTAssertEqual(manager.handleQueue, DispatchQueue.main)
|
||||
XCTAssertTrue(manager.reconnects)
|
||||
XCTAssertEqual(manager.reconnectWait, 10)
|
||||
XCTAssertEqual(manager.reconnectWaitMax, 30)
|
||||
XCTAssertEqual(manager.randomizationFactor, 0.5)
|
||||
XCTAssertEqual(manager.status, .notConnected)
|
||||
}
|
||||
|
||||
func testSettingConfig() {
|
||||
let manager = SocketManager(socketURL: URL(string: "https://example.com/")!)
|
||||
|
||||
XCTAssertEqual(manager.config.first!, .secure(true))
|
||||
|
||||
manager.config = []
|
||||
|
||||
XCTAssertEqual(manager.config.first!, .secure(true))
|
||||
}
|
||||
|
||||
func testBackoffIntervalCalulation() {
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: -1), Double(manager.reconnectWaitMax))
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: 0), 15)
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: 1), 22.5)
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: 2), 33.75)
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: 50), Double(manager.reconnectWaitMax))
|
||||
XCTAssertLessThanOrEqual(manager.reconnectInterval(attempts: 10000), Double(manager.reconnectWaitMax))
|
||||
|
||||
XCTAssertGreaterThanOrEqual(manager.reconnectInterval(attempts: -1), Double(manager.reconnectWait))
|
||||
XCTAssertGreaterThanOrEqual(manager.reconnectInterval(attempts: 0), Double(manager.reconnectWait))
|
||||
XCTAssertGreaterThanOrEqual(manager.reconnectInterval(attempts: 1), 15)
|
||||
XCTAssertGreaterThanOrEqual(manager.reconnectInterval(attempts: 2), 22.5)
|
||||
XCTAssertGreaterThanOrEqual(manager.reconnectInterval(attempts: 10000), Double(manager.reconnectWait))
|
||||
}
|
||||
|
||||
func testManagerCallsConnect() {
|
||||
setUpSockets()
|
||||
|
||||
@@ -79,13 +106,19 @@ class SocketMangerTest : XCTestCase {
|
||||
.handleQueue(queue),
|
||||
.forceNew(true),
|
||||
.reconnects(false),
|
||||
.reconnectWait(5)
|
||||
.reconnectWait(5),
|
||||
.reconnectWaitMax(5),
|
||||
.randomizationFactor(0.7),
|
||||
.reconnectAttempts(5)
|
||||
])
|
||||
|
||||
XCTAssertEqual(manager.handleQueue, queue)
|
||||
XCTAssertTrue(manager.forceNew)
|
||||
XCTAssertFalse(manager.reconnects)
|
||||
XCTAssertEqual(manager.reconnectWait, 5)
|
||||
XCTAssertEqual(manager.reconnectWaitMax, 5)
|
||||
XCTAssertEqual(manager.randomizationFactor, 0.7)
|
||||
XCTAssertEqual(manager.reconnectAttempts, 5)
|
||||
}
|
||||
|
||||
func testManagerRemovesSocket() {
|
||||
@@ -186,7 +219,7 @@ public class TestSocket : SocketIOClient {
|
||||
super.didDisconnect(reason: reason)
|
||||
}
|
||||
|
||||
public override func emit(_ event: String, with items: [Any]) {
|
||||
public override func emit(_ event: String, with items: [Any], completion: (() -> ())?) {
|
||||
expectations[ManagerExpectation.emitAllEventCalled]?.fulfill()
|
||||
expectations[ManagerExpectation.emitAllEventCalled] = nil
|
||||
|
||||
|
||||
@@ -9,133 +9,198 @@
|
||||
import XCTest
|
||||
@testable import SocketIO
|
||||
|
||||
class SocketNamespacePacketTest: XCTestCase {
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
|
||||
func testEmpyEmit() {
|
||||
let expectedSendString = "2/swift,[\"test\"]"
|
||||
class SocketNamespacePacketTest : XCTestCase {
|
||||
func testEmptyEmit() {
|
||||
let sendData: [Any] = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testNullEmit() {
|
||||
let expectedSendString = "2/swift,[\"test\",null]"
|
||||
let sendData: [Any] = ["test", NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testStringEmit() {
|
||||
let expectedSendString = "2/swift,[\"test\",\"foo bar\"]"
|
||||
let sendData: [Any] = ["test", "foo bar"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testJSONEmit() {
|
||||
let expectedSendString = "2/swift,[\"test\",{\"null\":null,\"test\":\"hello\",\"hello\":1,\"foobar\":true}]"
|
||||
let sendData: [Any] = ["test", ["foobar": true, "hello": 1, "test": "hello", "null": NSNull()] as NSDictionary]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testArrayEmit() {
|
||||
let expectedSendString = "2/swift,[\"test\",[\"hello\",1,{\"test\":\"test\"},true]]"
|
||||
let sendData: [Any] = ["test", ["hello", 1, ["test": "test"], true]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testBinaryEmit() {
|
||||
let expectedSendString = "51-/swift,[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
"test",
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
}
|
||||
|
||||
|
||||
func testMultipleBinaryEmit() {
|
||||
let expectedSendString = "52-/swift,[\"test\",{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData: [Any] = ["test", ["data1": data, "data2": data2] as NSDictionary]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
|
||||
let binaryObj = parsed.data[1] as! [String: Any]
|
||||
let data1Loc = (binaryObj["data1"] as! [String: Any])["num"] as! Int
|
||||
let data2Loc = (binaryObj["data2"] as! [String: Any])["num"] as! Int
|
||||
|
||||
XCTAssertEqual(packet.binary[data1Loc], data)
|
||||
XCTAssertEqual(packet.binary[data2Loc], data2)
|
||||
}
|
||||
|
||||
|
||||
func testEmitWithAck() {
|
||||
let expectedSendString = "2/swift,0[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .event)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testEmitDataWithAck() {
|
||||
let expectedSendString = "51-/swift,0[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: false)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .binaryEvent)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
"test",
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
}
|
||||
|
||||
|
||||
// Acks
|
||||
func testEmptyAck() {
|
||||
let expectedSendString = "3/swift,0[]"
|
||||
let packet = SocketPacket.packetFromEmit([], id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
}
|
||||
|
||||
|
||||
func testNullAck() {
|
||||
let expectedSendString = "3/swift,0[null]"
|
||||
let sendData = [NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testStringAck() {
|
||||
let expectedSendString = "3/swift,0[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testJSONAck() {
|
||||
let expectedSendString = "3/swift,0[{\"null\":null,\"hello\":1,\"test\":\"hello\",\"foobar\":true}]"
|
||||
let sendData = [["foobar": true, "hello": 1, "test": "hello", "null": NSNull()]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .ack)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: sendData))
|
||||
}
|
||||
|
||||
|
||||
func testBinaryAck() {
|
||||
let expectedSendString = "61-/swift,0[{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData = [data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .binaryAck)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
XCTAssertTrue(compareAnyArray(input: parsed.data, expected: [
|
||||
["_placeholder": true, "num": 0]
|
||||
]))
|
||||
}
|
||||
|
||||
|
||||
func testMultipleBinaryAck() {
|
||||
let expectedSendString = "62-/swift,0[{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData = [["data1": data, "data2": data2]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/swift", ack: true)
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
let parsed = parser.parseSocketMessage(packet.packetString)!
|
||||
|
||||
XCTAssertEqual(parsed.type, .binaryAck)
|
||||
XCTAssertEqual(parsed.nsp, "/swift")
|
||||
XCTAssertEqual(parsed.id, 0)
|
||||
|
||||
let binaryObj = parsed.data[0] as! [String: Any]
|
||||
let data1Loc = (binaryObj["data1"] as! [String: Any])["num"] as! Int
|
||||
let data2Loc = (binaryObj["data2"] as! [String: Any])["num"] as! Int
|
||||
|
||||
XCTAssertEqual(packet.binary[data1Loc], data)
|
||||
XCTAssertEqual(packet.binary[data2Loc], data2)
|
||||
}
|
||||
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
var parser: SocketParsable!
|
||||
|
||||
private func compareAnyArray(input: [Any], expected: [Any]) -> Bool {
|
||||
guard input.count == expected.count else { return false }
|
||||
|
||||
return (input as NSArray).isEqual(to: expected)
|
||||
}
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
parser = SocketManager(socketURL: URL(string: "http://localhost")!)
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,11 @@ class SocketSideEffectTest: XCTestCase {
|
||||
XCTAssertEqual(socket.currentAck, 1)
|
||||
}
|
||||
|
||||
func testEmitCompletionSyntax() {
|
||||
socket.emit("test", completion: {})
|
||||
socket.emit("test", "thing", completion: {})
|
||||
}
|
||||
|
||||
func testHandleAck() {
|
||||
let expect = expectation(description: "handled ack")
|
||||
socket.emitWithAck("test").timingOut(after: 0) {data in
|
||||
@@ -506,5 +511,5 @@ class TestEngine : SocketEngineSpec {
|
||||
func flushWaitingForPostToWebSocket() { }
|
||||
func parseEngineData(_ data: Data) { }
|
||||
func parseEngineMessage(_ message: String) { }
|
||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) { }
|
||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data], completion: (() -> ())?) { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by Erik Little on 2019-01-11.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@testable import SocketIO
|
||||
|
||||
public class OBjcUtils: NSObject {
|
||||
@objc
|
||||
public static func setTestStatus(socket: SocketIOClient, status: SocketIOStatus) {
|
||||
socket.setTestStatus(status)
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,18 @@
|
||||
|
||||
- (void)testSettingConfig {
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost"];
|
||||
self.manager = [[TestManager alloc] initWithSocketURL:url config:@{@"forceNew": @YES}];
|
||||
NSDictionary* headers = @{@"My Header": @"Some Value"};
|
||||
|
||||
self.manager = [[TestManager alloc] initWithSocketURL:url config:@{
|
||||
@"forceNew": @YES,
|
||||
@"extraHeaders": headers
|
||||
}];
|
||||
|
||||
[self.manager connect];
|
||||
|
||||
XCTAssertTrue(self.manager.forceNew);
|
||||
XCTAssertTrue([self.manager.engine.extraHeaders isEqualToDictionary:headers]);
|
||||
|
||||
}
|
||||
|
||||
- (void)testManagerProperties {
|
||||
@@ -25,6 +34,8 @@
|
||||
XCTAssertEqual(self.manager.handleQueue, dispatch_get_main_queue());
|
||||
XCTAssertTrue(self.manager.reconnects);
|
||||
XCTAssertEqual(self.manager.reconnectWait, 10);
|
||||
XCTAssertEqual(self.manager.reconnectWaitMax, 30);
|
||||
XCTAssertEqual(self.manager.randomizationFactor, 0.5);
|
||||
XCTAssertEqual(self.manager.status, SocketIOStatusNotConnected);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// Merely tests whether the Objective-C api breaks
|
||||
//
|
||||
|
||||
#import "SocketIO_Tests-Swift.h"
|
||||
#import "SocketObjectiveCTest.h"
|
||||
|
||||
@import Dispatch;
|
||||
@@ -26,6 +27,7 @@
|
||||
- (void)testOnSyntax {
|
||||
[self.socket on:@"someCallback" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
[ack with:@[@1]];
|
||||
[[ack rawEmitView] with:@[@"hello"]];
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -66,6 +68,24 @@
|
||||
[self.socket emit:@"testEmit" with:@[@YES]];
|
||||
}
|
||||
|
||||
- (void)testEmitWriteCompletionSyntax {
|
||||
[self.socket emit:@"testEmit" with:@[@YES] completion:^{}];
|
||||
}
|
||||
|
||||
- (void)testEmitWriteCompletion {
|
||||
XCTestExpectation* expect = [self expectationWithDescription:@"Write completion should be called"];
|
||||
|
||||
[self.socket emit:@"testEmit" with:@[@YES] completion:^{
|
||||
[expect fulfill];
|
||||
}];
|
||||
|
||||
[self waitForExpectationsWithTimeout:0.3 handler:nil];
|
||||
}
|
||||
|
||||
- (void)testRawEmitSyntax {
|
||||
[[self.socket rawEmitView] emit:@"myEvent" with:@[@1]];
|
||||
}
|
||||
|
||||
- (void)testEmitWithAckSyntax {
|
||||
[[self.socket emitWithAck:@"testAckEmit" with:@[@YES]] timingOutAfter:0 callback:^(NSArray* data) { }];
|
||||
}
|
||||
@@ -79,6 +99,19 @@
|
||||
sec = nil;
|
||||
}
|
||||
|
||||
- (void)testStatusChangeHandler {
|
||||
XCTestExpectation* expect = [self expectationWithDescription:@"statusChange should be correctly called"];
|
||||
|
||||
[self.socket on:@"statusChange" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
XCTAssertTrue([data[1] integerValue] == SocketIOStatusConnecting);
|
||||
[expect fulfill];
|
||||
}];
|
||||
|
||||
[OBjcUtils setTestStatusWithSocket:self.socket status:SocketIOStatusConnecting];
|
||||
|
||||
[self waitForExpectationsWithTimeout:0.3 handler:nil];
|
||||
}
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost"];
|
||||
|
||||
@@ -104,6 +104,6 @@ will fire a `connect` event.
|
||||
|
||||
The difference is that if `connect()` is just called on the manager, then any sockets for that manager that are not the default
|
||||
socket will not automatically connect. `connect()` will need to be called individually for each socket. However, if `connect()`
|
||||
is called on a client, then in addition to opening the connection if needed, the client will connect to the its namespace,
|
||||
is called on a client, then in addition to opening the connection if needed, the client will connect to its namespace,
|
||||
and a `connect` event fired.
|
||||
|
||||
+12
-3
@@ -78,6 +78,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +173,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -264,7 +273,7 @@ will fire a <code>connect</code> event. </p>
|
||||
|
||||
<p>The difference is that if <code>connect()</code> is just called on the manager, then any sockets for that manager that are not the default
|
||||
socket will not automatically connect. <code>connect()</code> will need to be called individually for each socket. However, if <code>connect()</code>
|
||||
is called on a client, then in addition to opening the connection if needed, the client will connect to the its namespace,
|
||||
is called on a client, then in addition to opening the connection if needed, the client will connect to its namespace,
|
||||
and a <code>connect</code> event fired.</p>
|
||||
|
||||
</div>
|
||||
@@ -274,8 +283,8 @@ and a <code>connect</code> event fired.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+121
-42
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
|
||||
|
||||
<a title="Classes Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -183,40 +193,6 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketEngine" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine">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 swift"><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><span class="p">,</span>
|
||||
<span class="kt"><a href="Protocols/ConfigSettable.html">ConfigSettable</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
@@ -365,9 +341,9 @@ Example:</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SSLSecurity"></a>
|
||||
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SSLSecurity">SSLSecurity</a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketRawView"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketRawView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketRawView">SocketRawView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -375,15 +351,84 @@ Example:</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A wrapper around Starscream’s SSLSecurity that provides a minimal Objective-C interface.</p>
|
||||
<p>Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.</p>
|
||||
|
||||
<a href="Classes/SSLSecurity.html" class="slightly-smaller">See more</a>
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">emit</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">,</span> <span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<a href="Classes/SocketRawView.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 swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">SSLSecurity</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketRawView</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketRawAckView"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketRawAckView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketRawAckView">SocketRawAckView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">ack</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<a href="Classes/SocketRawAckView.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 swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketRawAckView</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="/c:@M@SocketIO@objc(cs)SocketEngine"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketEngine" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine">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 swift"><code><span class="kd">open</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><span class="p">,</span> <span class="kt"><a href="Protocols/ConfigSettable.html">ConfigSettable</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -425,6 +470,8 @@ to the manager must be maintained to keep sockets alive.</p>
|
||||
<p>To disconnect a socket and remove it from the manager, either call <code><a href="Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)SocketIOClient(im)disconnect">SocketIOClient.disconnect()</a></code> on the socket,
|
||||
or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
|
||||
<p><strong>NOTE</strong>: The manager is not thread/queue safe, all interaction with the manager should be done on the <code>handleQueue</code></p>
|
||||
|
||||
<a href="Classes/SocketManager.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -440,14 +487,46 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SSLSecurity"></a>
|
||||
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SSLSecurity">SSLSecurity</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A wrapper around Starscream’s SSLSecurity that provides a minimal Objective-C interface.</p>
|
||||
|
||||
<a href="Classes/SSLSecurity.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 swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">SSLSecurity</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>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -225,7 +234,8 @@ Example:</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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">Double</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:8SocketIO11AckCallbacka">AckCallback</a></span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<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">Double</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:8SocketIO11AckCallbacka">AckCallback</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -272,8 +282,8 @@ Example:</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO11SSLSecurityC8security10StarscreamABCv"></a>
|
||||
<a name="/s:8SocketIO11SSLSecurityC8security10StarscreamABCvp"></a>
|
||||
<a name="//apple_ref/swift/Property/security" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC8security10StarscreamABCv">security</a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC8security10StarscreamABCvp">security</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -258,7 +267,8 @@ pinning validation</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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">true</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<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">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -288,9 +298,9 @@ validation</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO11SSLSecurityCACSay10Starscream7SSLCertCG5certs_Sb13usePublicKeystcfc"></a>
|
||||
<a name="/s:8SocketIO11SSLSecurityC5certs13usePublicKeysACSay10Starscream7SSLCertCG_Sbtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(certs:usePublicKeys:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityCACSay10Starscream7SSLCertCG5certs_Sb13usePublicKeystcfc">init(certs:usePublicKeys:)</a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC5certs13usePublicKeysACSay10Starscream7SSLCertCG_Sbtcfc">init(certs:usePublicKeys:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -351,9 +361,9 @@ validation</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO11SSLSecurityC7isValidSbSo8SecTrustC_SSSg6domaintF"></a>
|
||||
<a name="/s:8SocketIO11SSLSecurityC7isValid_6domainSbSo11SecTrustRefa_SSSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/isValid(_:domain:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC7isValidSbSo8SecTrustC_SSSg6domaintF">isValid(_:domain:)</a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC7isValid_6domainSbSo11SecTrustRefa_SSSgtF">isValid(_:domain:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -418,8 +428,8 @@ validation</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -192,6 +201,44 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAckEmitter(py)rawEmitView"></a>
|
||||
<a name="//apple_ref/swift/Property/rawEmitView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAckEmitter(py)rawEmitView">rawEmitView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A view into this emitter where emits do not check for binary data.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">ack</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p><strong>NOTE</strong>: It is not safe to hold on to this view beyond the life of the socket.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">private(set)</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">rawEmitView</span><span class="p">:</span> <span class="nf">SocketRawAckView</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</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>
|
||||
@@ -204,9 +251,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC8expectedSbv"></a>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC8expectedSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/expected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC8expectedSbv">expected</a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC8expectedSbvp">expected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -221,7 +268,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">expected</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,9 +289,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A10AckEmitterCAcA0A8IOClientC6socket_Si6ackNumtcfc"></a>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC6socket6ackNumAcA0A8IOClientC_Sitcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(socket:ackNum:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterCAcA0A8IOClientC6socket_Si6ackNumtcfc">init(socket:ackNum:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC6socket6ackNumAcA0A8IOClientC_Sitcfc">init(socket:ackNum:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -311,9 +358,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC4withySayAA0A4Data_pGd_tF"></a>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC4withyyAA0A4Data_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC4withySayAA0A4Data_pGd_tF">with(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC4withyyAA0A4Data_pd_tF">with(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -323,7 +370,7 @@
|
||||
<div class="abstract">
|
||||
<p>Call to ack receiving this event.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[ackNum, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
@@ -377,7 +424,8 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<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>
|
||||
@@ -411,8 +459,8 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -219,7 +228,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<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>
|
||||
@@ -246,7 +256,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<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>
|
||||
@@ -273,7 +284,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -288,8 +299,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+139
-55
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,8 +188,7 @@
|
||||
<h1>SocketEngine</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><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><span class="p">,</span>
|
||||
<span class="kt"><a href="../Protocols/ConfigSettable.html">ConfigSettable</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</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><span class="p">,</span> <span class="kt"><a href="../Protocols/ConfigSettable.html">ConfigSettable</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,7 +229,7 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">engineQueue</span> <span class="o">=</span> <span class="nf">DispatchQueue</span><span class="p">(</span><span class="nv">label</span><span class="p">:</span> <span class="s">"com.socketio.engineHandleQueue"</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">engineQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,7 +256,7 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">connectParams</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">connectParams</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -275,7 +283,7 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">extraHeaders</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">extraHeaders</span><span class="p">:</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>
|
||||
@@ -285,9 +293,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC8postWaitSaySSGv"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC8postWaitSaySS3msg_yycSg10completiontGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC8postWaitSaySSGv">postWait</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC8postWaitSaySS3msg_yycSg10completiontGvp">postWait</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -304,7 +312,7 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">postWait</span> <span class="o">=</span> <span class="p">[</span><span class="kt">String</span><span class="p">]()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">postWait</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Typealiases.html#/s:8SocketIO4Posta">Post</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -314,9 +322,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPollSbv"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPollSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPoll" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPollSbv">waitingForPoll</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPollSbvp">waitingForPoll</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -334,7 +342,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingForPoll</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingForPoll</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -344,9 +352,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPostSbv"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPostSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPost" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPostSbv">waitingForPost</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPostSbvp">waitingForPost</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -364,7 +372,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingForPost</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingForPost</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -391,7 +399,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">closed</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">closed</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -418,7 +428,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">compress</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">compress</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -445,7 +457,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">connected</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">connected</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -472,7 +486,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">cookies</span><span class="p">:</span> <span class="p">[</span><span class="kt">HTTPCookie</span><span class="p">]?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">cookies</span><span class="p">:</span> <span class="p">[</span><span class="kt">HTTPCookie</span><span class="p">]?</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -501,7 +517,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">fastUpgrade</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">fastUpgrade</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -528,7 +546,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">forcePolling</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">forcePolling</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -555,7 +575,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">forceWebsockets</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">forceWebsockets</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -565,9 +587,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC11invalidatedSbv"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC11invalidatedSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/invalidated" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC11invalidatedSbv">invalidated</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC11invalidatedSbvp">invalidated</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -582,7 +604,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">invalidated</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">invalidated</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -609,7 +633,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">polling</span> <span class="o">=</span> <span class="kc">true</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">polling</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -636,7 +662,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">probing</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">probing</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -646,9 +674,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgv"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC7sessionSo12NSURLSessionCSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgv">session</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC7sessionSo12NSURLSessionCSgvp">session</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -663,7 +691,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">session</span><span class="p">:</span> <span class="nf">URLSession</span><span class="p">?</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -690,7 +720,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">sid</span> <span class="o">=</span> <span class="s">""</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">sid</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -717,7 +749,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">socketPath</span> <span class="o">=</span> <span class="s">"/engine.io/"</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">socketPath</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -744,7 +778,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">urlPolling</span> <span class="o">=</span> <span class="nf">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://localhost/"</span><span class="p">)</span><span class="o">!</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">urlPolling</span><span class="p">:</span> <span class="nf">URL</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -771,7 +807,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">urlWebSocket</span> <span class="o">=</span> <span class="nf">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://localhost/"</span><span class="p">)</span><span class="o">!</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">urlWebSocket</span><span class="p">:</span> <span class="nf">URL</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -798,7 +836,39 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">websocket</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@available(*, deprecated, message: "No longer needed, if we're not polling, then we must be doing websockets")</span>
|
||||
<span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">websocket</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC16enableSOCKSProxySbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/enableSOCKSProxy" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC16enableSOCKSProxySbvp">enableSOCKSProxy</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>When <code>true</code>, the WebSocket <code>stream</code> will be configured with the enableSOCKSProxy <code>true</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">enableSOCKSProxy</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -825,7 +895,9 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="nf">WebSocket</span><span class="p">?</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -873,9 +945,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineCAcA0aC6Client_p6client_10Foundation3URLV3urlAA0A21IOClientConfigurationV6configtcfc"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC6client3url6configAcA0aC6Client_p_10Foundation3URLVAA0A21IOClientConfigurationVtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(client:url:config:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineCAcA0aC6Client_p6client_10Foundation3URLV3urlAA0A21IOClientConfigurationV6configtcfc">init(client:url:config:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC6client3url6configAcA0aC6Client_p_10Foundation3URLVAA0A21IOClientConfigurationVtcfc">init(client:url:config:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -960,7 +1032,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></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">options</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">required</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></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">options</span><span class="p">:</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>
|
||||
@@ -1041,7 +1113,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1068,7 +1140,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">didError</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>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">didError</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>
|
||||
@@ -1095,7 +1167,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">disconnect</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>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">disconnect</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>
|
||||
@@ -1144,7 +1216,7 @@ WebSocket mode.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">doFastUpgrade</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">doFastUpgrade</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1174,7 +1246,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">flushWaitingForPostToWebSocket</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">flushWaitingForPostToWebSocket</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1201,7 +1273,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">parseEngineData</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>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">parseEngineData</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>
|
||||
@@ -1247,7 +1319,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">parseEngineMessage</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></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">parseEngineMessage</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></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1276,9 +1348,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC10setConfigsyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC10setConfigsyyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="//apple_ref/swift/Method/setConfigs(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC10setConfigsyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC10setConfigsyyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1305,9 +1377,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)write:withType:withData:"></a>
|
||||
<a name="//apple_ref/swift/Method/write(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)write:withType:withData:">write(_:withType:withData:)</a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)write:withType:withData:completion:"></a>
|
||||
<a name="//apple_ref/swift/Method/write(_:withType:withData:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)write:withType:withData:completion:">write(_:withType:withData:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1322,7 +1394,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">write</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> <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">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">write</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> <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">data</span><span class="p">:</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>
|
||||
@@ -1366,6 +1438,18 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1386,9 +1470,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6EngineC10URLSessionySoADC7session_So7NSErrorCSg25didBecomeInvalidWithErrortF"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC10URLSession7session25didBecomeInvalidWithErrorySo12NSURLSessionC_So7NSErrorCSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/URLSession(session:didBecomeInvalidWithError:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC10URLSessionySoADC7session_So7NSErrorCSg25didBecomeInvalidWithErrortF">URLSession(session:didBecomeInvalidWithError:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC10URLSession7session25didBecomeInvalidWithErrorySo12NSURLSessionC_So7NSErrorCSgtF">URLSession(session:didBecomeInvalidWithError:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1418,8 +1502,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -232,7 +241,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="k">let</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -259,7 +269,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">sid</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="k">var</span> <span class="nv">sid</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,9 +280,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC10anyHandleryAA0A8AnyEventCcSgv"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC10anyHandleryAA0A8AnyEventCcSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/anyHandler" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC10anyHandleryAA0A8AnyEventCcSgv">anyHandler</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC10anyHandleryAA0A8AnyEventCcSgvp">anyHandler</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -286,7 +297,9 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">anyHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">anyHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())?</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -296,9 +309,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC8handlersSayAA0A12EventHandlerVGv"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC8handlersSayAA0A12EventHandlerVGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/handlers" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC8handlersSayAA0A12EventHandlerVGv">handlers</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC8handlersSayAA0A12EventHandlerVGvp">handlers</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -313,7 +326,9 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">handlers</span> <span class="o">=</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketEventHandler.html">SocketEventHandler</a></span><span class="p">]()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">handlers</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketEventHandler.html">SocketEventHandler</a></span><span class="p">]</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -340,7 +355,44 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">manager</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketManagerSpec.html">SocketManagerSpec</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">manager</span><span class="p">:</span> <span class="nf">SocketManagerSpec</span><span class="p">?</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketIOClient(py)rawEmitView"></a>
|
||||
<a name="//apple_ref/swift/Property/rawEmitView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketIOClient(py)rawEmitView">rawEmitView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A view into this socket where emits do not check for binary data.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">emit</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">,</span> <span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p><strong>NOTE</strong>: It is not safe to hold on to this view beyond the life of the socket.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">private(set)</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">rawEmitView</span><span class="p">:</span> <span class="nf">SocketRawView</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -367,24 +419,14 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">status</span> <span class="o">=</span> <span class="kt"><a href="../Enums/SocketIOStatus.html">SocketIOStatus</a></span><span class="o">.</span><span class="n">notConnected</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="nf">SocketIOStatus</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</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>
|
||||
@@ -405,7 +447,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">manager</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketManagerSpec.html">SocketManagerSpec</a></span><span class="p">,</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">manager</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketManagerSpec.html">SocketManagerSpec</a></span><span class="p">,</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -476,7 +519,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -505,7 +549,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">(</span><span class="nv">timeoutAfter</span><span class="p">:</span> <span class="kt">Double</span><span class="p">,</span> <span class="n">withHandler</span> <span class="nv">handler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">(</span><span class="nv">timeoutAfter</span><span class="p">:</span> <span class="kt">Double</span><span class="p">,</span> <span class="n">withHandler</span> <span class="nv">handler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -547,9 +592,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC10didConnectySS11toNamespace_tF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC10didConnect11toNamespaceySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/didConnect(toNamespace:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC10didConnectySS11toNamespace_tF">didConnect(toNamespace:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC10didConnect11toNamespaceySS_tF">didConnect(toNamespace:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -594,9 +639,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC13didDisconnectySS6reason_tF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC13didDisconnect6reasonySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/didDisconnect(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC13didDisconnectySS6reason_tF">didDisconnect(reason:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC13didDisconnect6reasonySS_tF">didDisconnect(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -660,7 +705,8 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">disconnect</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">disconnect</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -670,9 +716,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC4emitySS_SayAA0A4Data_pGdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC4emitySS_SayAA0A4Data_pGdtF">emit(_:_:)</a>
|
||||
<a name="/s:8SocketIO0A8IOClientC4emit__10completionySS_AA0A4Data_pdyycSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:_:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC4emit__10completionySS_AA0A4Data_pdyycSgtF">emit(_:_:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -680,9 +726,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Send an event to the server, with optional data items.</p>
|
||||
<p>Send an event to the server, with optional data items and optional write completion handler.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
@@ -690,7 +736,7 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">SocketData</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">SocketData</a></span><span class="o">...</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>
|
||||
@@ -722,6 +768,18 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -748,7 +806,8 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</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>
|
||||
@@ -789,9 +848,80 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC11emitWithAckAA02OnF8CallbackCSS_SayAA0A4Data_pGdtF"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketIOClient(im)emit:with:completion:"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:with:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketIOClient(im)emit:with:completion:">emit(_:with:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Same as emit, but meant for Objective-C</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</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>event</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The event to send.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>items</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The items to send with this event. Send an empty array to send no data.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC11emitWithAckyAA02OnF8CallbackCSS_AA0A4Data_pdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitWithAck(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC11emitWithAckAA02OnF8CallbackCSS_SayAA0A4Data_pGdtF">emitWithAck(_:_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC11emitWithAckyAA02OnF8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -804,7 +934,7 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<p><strong>NOTE</strong>: 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.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
<p>Example:</p>
|
||||
@@ -889,7 +1019,8 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">emitWithAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="kt"><a href="../Classes/OnAckCallback.html">OnAckCallback</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">emitWithAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="kt"><a href="../Classes/OnAckCallback.html">OnAckCallback</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -934,9 +1065,9 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC7emitAckySi_SayypG4withtF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC7emitAck_4withySi_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitAck(_:with:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC7emitAckySi_SayypG4withtF">emitAck(_:with:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC7emitAck_4withySi_SayypGtF">emitAck(_:with:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1011,7 +1142,8 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">handleAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">ack</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">handleAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">ack</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1052,9 +1184,9 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC17handleClientEventyAA0aeF0O_SayypG4datatF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC17handleClientEvent_4datayAA0aeF0O_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/handleClientEvent(_:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC17handleClientEventyAA0aeF0O_SayypG4datatF">handleClientEvent(_:data:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC17handleClientEvent_4datayAA0aeF0O_SayypGtF">handleClientEvent(_:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1127,7 +1259,8 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">handleEvent</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">],</span> <span class="nv">isInternalMessage</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="n">withAck</span> <span class="nv">ack</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">handleEvent</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">],</span> <span class="nv">isInternalMessage</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="n">withAck</span> <span class="nv">ack</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1192,9 +1325,9 @@ Check that your server’s api will ack the event being sent.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC12handlePacketyAA0aE0VF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC12handlePacketyyAA0aE0VF"></a>
|
||||
<a name="//apple_ref/swift/Method/handlePacket(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC12handlePacketyAA0aE0VF">handlePacket(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC12handlePacketyyAA0aE0VF">handlePacket(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1256,7 +1389,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">leaveNamespace</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">leaveNamespace</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1283,7 +1417,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">joinNamespace</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">joinNamespace</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1293,9 +1428,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC3offyAA0A11ClientEventO06clientF0_tF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC3off11clientEventyAA0a6ClientF0O_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/off(clientEvent:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC3offyAA0A11ClientEventO06clientF0_tF">off(clientEvent:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC3off11clientEventyAA0a6ClientF0O_tF">off(clientEvent:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1360,7 +1495,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">off</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">off</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1408,7 +1544,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">off</span><span class="p">(</span><span class="nv">id</span><span class="p">:</span> <span class="kt">UUID</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">off</span><span class="p">(</span><span class="nv">id</span><span class="p">:</span> <span class="kt">UUID</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1454,7 +1591,9 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">on</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
|
||||
<span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">on</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1499,9 +1638,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC2on10Foundation4UUIDVAA0A11ClientEventO06clientH0_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC2on11clientEvent8callback10Foundation4UUIDVAA0a6ClientF0O_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/on(clientEvent:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC2on10Foundation4UUIDVAA0A11ClientEventO06clientH0_ySayypG_AA0A10AckEmitterCtc8callbacktF">on(clientEvent:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC2on11clientEvent8callback10Foundation4UUIDVAA0a6ClientF0O_ySayypG_AA0A10AckEmitterCtctF">on(clientEvent:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1522,7 +1661,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">on</span><span class="p">(</span><span class="n">clientEvent</span> <span class="nv">event</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketClientEvent.html">SocketClientEvent</a></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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">on</span><span class="p">(</span><span class="n">clientEvent</span> <span class="nv">event</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketClientEvent.html">SocketClientEvent</a></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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1567,9 +1707,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOClientC4once10Foundation4UUIDVAA0A11ClientEventO06clientH0_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A8IOClientC4once11clientEvent8callback10Foundation4UUIDVAA0a6ClientF0O_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/once(clientEvent:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC4once10Foundation4UUIDVAA0A11ClientEventO06clientH0_ySayypG_AA0A10AckEmitterCtc8callbacktF">once(clientEvent:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOClientC4once11clientEvent8callback10Foundation4UUIDVAA0a6ClientF0O_ySayypG_AA0A10AckEmitterCtctF">once(clientEvent:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1584,7 +1724,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">once</span><span class="p">(</span><span class="n">clientEvent</span> <span class="nv">event</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketClientEvent.html">SocketClientEvent</a></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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">once</span><span class="p">(</span><span class="n">clientEvent</span> <span class="nv">event</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketClientEvent.html">SocketClientEvent</a></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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1646,7 +1787,9 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">once</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
|
||||
<span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">once</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</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:8SocketIO14NormalCallbacka">NormalCallback</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">UUID</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1708,7 +1851,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">onAny</span><span class="p">(</span><span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">onAny</span><span class="p">(</span><span class="n">_</span> <span class="nv">handler</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">(</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1756,7 +1900,8 @@ socket.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">removeAllHandlers</span><span class="p">()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">removeAllHandlers</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1784,7 +1929,8 @@ Called when the manager detects a broken connection, or when a manual reconnect
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">setReconnecting</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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">open</span> <span class="kd">func</span> <span class="nf">setReconnecting</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>
|
||||
@@ -1818,8 +1964,8 @@ Called when the manager detects a broken connection, or when a manual reconnect
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+142
-29
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -201,6 +210,8 @@ to the manager must be maintained to keep sockets alive.</p>
|
||||
<p>To disconnect a socket and remove it from the manager, either call <code><a href="../Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)SocketIOClient(im)disconnect">SocketIOClient.disconnect()</a></code> on the socket,
|
||||
or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
|
||||
<p><strong>NOTE</strong>: The manager is not thread/queue safe, all interaction with the manager should be done on the <code>handleQueue</code></p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -235,7 +246,7 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">defaultSocket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">defaultSocket</span><span class="p">:</span> <span class="nf">SocketIOClient</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -275,9 +286,9 @@ init.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerC6configAA0A21IOClientConfigurationVv"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC6configAA0A21IOClientConfigurationVvp"></a>
|
||||
<a name="//apple_ref/swift/Property/config" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC6configAA0A21IOClientConfigurationVv">config</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC6configAA0A21IOClientConfigurationVvp">config</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -294,7 +305,7 @@ init.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">config</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">config</span><span class="p">:</span> <span class="nf">SocketIOClientConfiguration</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -348,7 +359,7 @@ init.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceNew</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">forceNew</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -378,7 +389,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">handleQueue</span> <span class="o">=</span> <span class="kt">DispatchQueue</span><span class="o">.</span><span class="n">main</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">handleQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -405,7 +416,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">nsps</span> <span class="o">=</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">]()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">nsps</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -432,7 +443,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reconnects</span> <span class="o">=</span> <span class="kc">true</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reconnects</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -452,14 +463,68 @@ called on.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The number of seconds to wait before attempting to reconnect.</p>
|
||||
<p>The minimum number of seconds to wait before attempting to reconnect.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reconnectWait</span> <span class="o">=</span> <span class="mi">10</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reconnectWait</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketManager(py)reconnectWaitMax"></a>
|
||||
<a name="//apple_ref/swift/Property/reconnectWaitMax" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketManager(py)reconnectWaitMax">reconnectWaitMax</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The maximum number of seconds to wait before attempting to reconnect.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">reconnectWaitMax</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketManager(py)randomizationFactor"></a>
|
||||
<a name="//apple_ref/swift/Property/randomizationFactor" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketManager(py)randomizationFactor">randomizationFactor</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The randomization factor for calculating reconnect jitter.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">randomizationFactor</span><span class="p">:</span> <span class="kt">Double</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -486,7 +551,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketIOStatus.html">SocketIOStatus</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">notConnected</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="nf">SocketIOStatus</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -496,9 +561,9 @@ called on.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerC14waitingPacketsSayAA0A6PacketVGv"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC14waitingPacketsSayAA0A6PacketVGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingPackets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC14waitingPacketsSayAA0A6PacketVGv">waitingPackets</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC14waitingPacketsSayAA0A6PacketVGvp">waitingPackets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -518,7 +583,7 @@ So this should ideally be an array of one packet waiting for data.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingPackets</span> <span class="o">=</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketPacket.html">SocketPacket</a></span><span class="p">]()</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitingPackets</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketPacket.html">SocketPacket</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -539,9 +604,9 @@ So this should ideally be an array of one packet waiting for data.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerCAC10Foundation3URLV06socketE0_AA0A21IOClientConfigurationV6configtcfc"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC9socketURL6configAC10Foundation0E0V_AA0A21IOClientConfigurationVtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(socketURL:config:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerCAC10Foundation3URLV06socketE0_AA0A21IOClientConfigurationV6configtcfc">init(socketURL:config:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC9socketURL6configAC10Foundation0E0V_AA0A21IOClientConfigurationVtcfc">init(socketURL:config:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -615,7 +680,8 @@ If using Swift it’s recommended to use <code>init(socketURL: NSURL, option
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</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">config</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</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">config</span><span class="p">:</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>
|
||||
@@ -913,9 +979,9 @@ releasing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerC7emitAllyAA0A11ClientEventO06clientG0_SayypG4datatF"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC7emitAll11clientEvent4datayAA0a6ClientG0O_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitAll(clientEvent:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAllyAA0A11ClientEventO06clientG0_SayypG4datatF">emitAll(clientEvent:data:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAll11clientEvent4datayAA0a6ClientG0O_SayypGtF">emitAll(clientEvent:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -959,9 +1025,9 @@ releasing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerC7emitAllySS_SayAA0A4Data_pGdtF"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC7emitAllyySS_AA0A4Data_pdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitAll(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAllySS_SayAA0A4Data_pGdtF">emitAll(_:_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAllyySS_AA0A4Data_pdtF">emitAll(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1029,7 +1095,7 @@ releasing.</p>
|
||||
<div class="abstract">
|
||||
<p>Sends an event to the server on all namespaces in this manager.</p>
|
||||
|
||||
<p>Same as <code><a href="../Classes/SocketManager.html#/s:8SocketIO0A7ManagerC7emitAllySS_SayAA0A4Data_pGdtF">emitAll(_:_:)</a></code>, but meant for Objective-C.</p>
|
||||
<p>Same as <code><a href="../Classes/SocketManager.html#/s:8SocketIO0A7ManagerC7emitAllyySS_AA0A4Data_pdtF">emitAll(_:_:)</a></code>, but meant for Objective-C.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1266,6 +1332,52 @@ releasing.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketManager(im)engineDidWebsocketUpgradeWithHeaders:"></a>
|
||||
<a name="//apple_ref/swift/Method/engineDidWebsocketUpgrade(headers:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketManager(im)engineDidWebsocketUpgradeWithHeaders:">engineDidWebsocketUpgrade(headers:)</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 when upgrading the http connection to a websocket connection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">engineDidWebsocketUpgrade</span><span class="p">(</span><span class="nv">headers</span><span class="p">:</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>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>headers</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The http headers.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -1373,8 +1485,8 @@ releasing.</p>
|
||||
<div class="abstract">
|
||||
<p>Tries to reconnect to the server.</p>
|
||||
|
||||
<p>This will cause a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO9reconnectA2CmF">SocketClientEvent.reconnect</a></code> event to be emitted, as well as
|
||||
<code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO16reconnectAttemptA2CmF">SocketClientEvent.reconnectAttempt</a></code> events.</p>
|
||||
<p>This will cause a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO9reconnectyA2CmF">SocketClientEvent.reconnect</a></code> event to be emitted, as well as
|
||||
<code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO16reconnectAttemptyA2CmF">SocketClientEvent.reconnectAttempt</a></code> events.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1411,7 +1523,8 @@ method.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">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>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
|
||||
<span class="kd">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>
|
||||
@@ -1444,9 +1557,9 @@ method.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7ManagerC10setConfigsyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="/s:8SocketIO0A7ManagerC10setConfigsyyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="//apple_ref/swift/Method/setConfigs(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC10setConfigsyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A7ManagerC10setConfigsyyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1534,8 +1647,8 @@ Or call <code><a href="../Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)Soc
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketRawAckView 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/SocketRawAckView" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketRawAckView Class Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(100% 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" />
|
||||
SocketRawAckView 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="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../12to13.html">12to13</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<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/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/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/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</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/SocketClientEvent.html">SocketClientEvent</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/SocketIOStatus.html">SocketIOStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</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/ConfigSettable.html">ConfigSettable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketDataBufferable.html">SocketDataBufferable</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/SocketIOClientSpec.html">SocketIOClientSpec</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/SocketManagerSpec.html">SocketManagerSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SocketRawAckView</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketRawAckView</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">ack</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">with</span><span class="p">(</span><span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
</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:8SocketIO0A10RawAckViewC4withyyAA0A4Data_pd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A10RawAckViewC4withyyAA0A4Data_pd_tF">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>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[ackNum, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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/SocketData.html">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="/c:@M@SocketIO@objc(cs)SocketRawAckView(im)with:"></a>
|
||||
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketRawAckView(im)with:">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 swift"><code><span class="kd">@objc</span>
|
||||
<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>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -0,0 +1,487 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketRawView 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/SocketRawView" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketRawView Class Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(100% 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" />
|
||||
SocketRawView 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="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../12to13.html">12to13</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<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/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/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/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</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/SocketClientEvent.html">SocketClientEvent</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/SocketIOStatus.html">SocketIOStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</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/ConfigSettable.html">ConfigSettable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketDataBufferable.html">SocketDataBufferable</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/SocketIOClientSpec.html">SocketIOClientSpec</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/SocketManagerSpec.html">SocketManagerSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SocketRawView</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">SocketRawView</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">emit</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">,</span> <span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
</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:8SocketIO0A7RawViewC4emityySS_AA0A4Data_pdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7RawViewC4emityySS_AA0A4Data_pdtF">emit(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Send an event to the server, with optional data items.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">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>event</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The event to send.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>items</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The items to send with this event. May be left out.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketRawView(im)emit:with:"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:with:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketRawView(im)emit:with:">emit(_:with:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Same as emit, but meant for Objective-C</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</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>event</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The event to send.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>items</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The items to send with this event. Send an empty array to send no data.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A7RawViewC11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitWithAck(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A7RawViewC11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Sends a message to the server, requesting an ack.</p>
|
||||
|
||||
<p><strong>NOTE</strong>: 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.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
<p>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="mi">1</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>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">emitWithAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">SocketData</a></span><span class="o">...</span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Classes/OnAckCallback.html">OnAckCallback</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>event</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The event to send.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>items</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The items to send with this event. May be left out.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>An <code><a href="../Classes/OnAckCallback.html">OnAckCallback</a></code>. You must call the <code>timingOut(after:)</code> method before the event will be sent.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketRawView(im)emitWithAck:with:"></a>
|
||||
<a name="//apple_ref/swift/Method/emitWithAck(_:with:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketRawView(im)emitWithAck:with:">emitWithAck(_:with:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Same as emitWithAck, but for Objective-C</p>
|
||||
|
||||
<p><strong>NOTE</strong>: 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.</p>
|
||||
|
||||
<p>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="nv">with</span><span class="p">:</span> <span class="p">[</span><span class="mi">1</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>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">emitWithAck</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">with</span> <span class="nv">items</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="kt"><a href="../Classes/OnAckCallback.html">OnAckCallback</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>event</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The event to send.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>items</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The items to send with this event. Use <code>[]</code> to send nothing.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>An <code><a href="../Classes/OnAckCallback.html">OnAckCallback</a></code>. You must call the <code>timingOut(after:)</code> method before the event will be sent.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+79
-67
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Enumerations" class="dashAnchor"></a>
|
||||
|
||||
<a title="Enumerations Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -183,38 +193,6 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType">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 swift"><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">
|
||||
@@ -247,38 +225,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketClientEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO">SocketClientEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The set of events that are generated by the client.</p>
|
||||
|
||||
<a href="Enums/SocketClientEvent.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 swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketClientEvent</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">
|
||||
@@ -311,6 +257,38 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketClientEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO">SocketClientEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The set of events that are generated by the client.</p>
|
||||
|
||||
<a href="Enums/SocketClientEvent.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 swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketClientEvent</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">
|
||||
@@ -334,7 +312,41 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOStatus</span> <span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOStatus</span> <span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="kt">CustomStringConvertible</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="/c:@M@SocketIO@E@SocketEnginePacketType"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType">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 swift"><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>
|
||||
@@ -381,8 +393,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -191,13 +200,20 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Cases"></a>
|
||||
<a name="//apple_ref/swift/Section/Cases" class="dashAnchor"></a>
|
||||
<a href="#/Cases">
|
||||
<h3 class="section-name">Cases</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A9AckStatusO02noC0A2CmF"></a>
|
||||
<a name="/s:8SocketIO0A9AckStatusO02noC0yA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAck" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A9AckStatusO02noC0A2CmF">noAck</a>
|
||||
<a class="token" href="#/s:8SocketIO0A9AckStatusO02noC0yA2CmF">noAck</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -227,8 +243,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -191,13 +200,20 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Cases"></a>
|
||||
<a name="//apple_ref/swift/Section/Cases" class="dashAnchor"></a>
|
||||
<a href="#/Cases">
|
||||
<h3 class="section-name">Cases</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO7connectA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO7connectyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO7connectA2CmF">connect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO7connectyA2CmF">connect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -225,16 +241,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO10disconnectA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO10disconnectyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/disconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO10disconnectA2CmF">disconnect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO10disconnectyA2CmF">disconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -262,16 +274,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO5errorA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO5erroryA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/error" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO5errorA2CmF">error</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO5erroryA2CmF">error</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -299,16 +307,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO4pingA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO4pingyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/ping" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO4pingA2CmF">ping</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO4pingyA2CmF">ping</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -336,16 +340,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO4pongA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO4pongyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/pong" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO4pongA2CmF">pong</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO4pongyA2CmF">pong</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -373,16 +373,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO9reconnectA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO9reconnectyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO9reconnectA2CmF">reconnect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO9reconnectyA2CmF">reconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -410,16 +406,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO16reconnectAttemptA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO16reconnectAttemptyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectAttempt" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO16reconnectAttemptA2CmF">reconnectAttempt</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO16reconnectAttemptyA2CmF">reconnectAttempt</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -447,16 +439,12 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO12statusChangeA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO12statusChangeyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/statusChange" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO12statusChangeA2CmF">statusChange</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO12statusChangeyA2CmF">statusChange</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -466,6 +454,9 @@ data item: the namespace that was connected to.</p>
|
||||
<div class="abstract">
|
||||
<p>Emitted every time there is a change in the client’s status.</p>
|
||||
|
||||
<p>The payload for data is [SocketIOClientStatus, Int]. Where the second item is the raw value. Use the second one
|
||||
if you are working in Objective-C.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="nv">clientEvent</span><span class="p">:</span> <span class="o">.</span><span class="n">statusChange</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="c1">// Some status changing logging</span>
|
||||
@@ -484,6 +475,40 @@ data item: the namespace that was connected to.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO16websocketUpgradeyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/websocketUpgrade" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO16websocketUpgradeyA2CmF">websocketUpgrade</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Emitted when when upgrading the http connection to a websocket connection.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="nv">clientEvent</span><span class="p">:</span> <span class="o">.</span><span class="n">websocketUpgrade</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">let</span> <span class="nv">headers</span> <span class="o">=</span> <span class="p">(</span><span class="n">data</span> <span class="k">as</span> <span class="p">[</span><span class="kt">Any</span><span class="p">])[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="c1">// Some header logic</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">websocketUpgrade</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -492,8 +517,8 @@ data item: the namespace that was connected to.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,8 @@
|
||||
<h1>SocketEnginePacketType</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -219,10 +229,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -250,10 +256,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -281,10 +283,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -312,10 +310,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -343,10 +337,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -374,10 +364,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -413,8 +399,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -195,9 +204,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8compressA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8compressyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/compress" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8compressA2CmF">compress</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8compressyA2CmF">compress</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,16 +228,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13connectParamsACs10DictionaryVySSypGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connectParams" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13connectParamsACs10DictionaryVySSypGcACmF">connectParams</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13connectParamsyACSDySSypGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connectParams(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13connectParamsyACSDySSypGcACmF">connectParams(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -243,23 +248,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</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">Any</span><span class="p">])</span></code></pre>
|
||||
<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">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:8SocketIO0A14IOClientOptionO7cookiesACSaySo10HTTPCookieCGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/cookies" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO7cookiesACSaySo10HTTPCookieCGcACmF">cookies</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO7cookiesyACSaySo12NSHTTPCookieCGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/cookies(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO7cookiesyACSaySo12NSHTTPCookieCGcACmF">cookies(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -281,16 +282,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12extraHeadersACs10DictionaryVyS2SGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/extraHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12extraHeadersACs10DictionaryVyS2SGcACmF">extraHeaders</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12extraHeadersyACSDyS2SGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/extraHeaders(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12extraHeadersyACSDyS2SGcACmF">extraHeaders(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -305,23 +302,19 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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:8SocketIO0A14IOClientOptionO8forceNewACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceNew" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8forceNewACSbcACmF">forceNew</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8forceNewyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceNew(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8forceNewyACSbcACmF">forceNew(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -344,16 +337,12 @@ or when you want to be sure no state from previous engines is being carried over
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12forcePollingACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forcePolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12forcePollingACSbcACmF">forcePolling</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12forcePollingyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forcePolling(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12forcePollingyACSbcACmF">forcePolling(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -375,16 +364,12 @@ or when you want to be sure no state from previous engines is being carried over
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15forceWebsocketsACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceWebsockets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15forceWebsocketsACSbcACmF">forceWebsockets</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15forceWebsocketsyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceWebsockets(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15forceWebsocketsyACSbcACmF">forceWebsockets(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -406,16 +391,39 @@ or when you want to be sure no state from previous engines is being carried over
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11handleQueueACSo08DispatchF0CcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/handleQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11handleQueueACSo08DispatchF0CcACmF">handleQueue</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO16enableSOCKSProxyyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/enableSOCKSProxy(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO16enableSOCKSProxyyACSbcACmF">enableSOCKSProxy(_:)</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 stream will be configured with the enableSOCKSProxy <code>true</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">enableSOCKSProxy</span><span class="p">(</span><span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11handleQueueyACSo17OS_dispatch_queueCcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/handleQueue(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11handleQueueyACSo17OS_dispatch_queueCcACmF">handleQueue(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -426,6 +434,8 @@ or when you want to be sure no state from previous engines is being carried over
|
||||
<p>The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||
called on.</p>
|
||||
|
||||
<p><strong>This should be a serial queue! Concurrent queues are not supported and might cause crashes and races</strong>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
@@ -438,16 +448,12 @@ called on.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO3logACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/log" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO3logACSbcACmF">log</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO3logyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/log(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO3logyACSbcACmF">log(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -469,16 +475,12 @@ called on.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6loggerAcA0A6Logger_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/logger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6loggerAcA0A6Logger_pcACmF">logger</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6loggeryAcA0A6Logger_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/logger(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6loggeryAcA0A6Logger_pcACmF">logger(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -500,16 +502,12 @@ called on.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO4pathACSScACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/path" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO4pathACSScACmF">path</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO4pathyACSScACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/path(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO4pathyACSScACmF">path(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -531,16 +529,12 @@ called on.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10reconnectsACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnects" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10reconnectsACSbcACmF">reconnects</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10reconnectsyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnects(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10reconnectsyACSbcACmF">reconnects(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -563,16 +557,12 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectAttempts" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsACSicACmF">reconnectAttempts</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsyACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectAttempts(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsyACSicACmF">reconnectAttempts(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -594,16 +584,12 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13reconnectWaitACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13reconnectWaitACSicACmF">reconnectWait</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13reconnectWaityACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectWait(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13reconnectWaityACSicACmF">reconnectWait(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -611,7 +597,7 @@ over when reconnects happen.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The number of seconds to wait before reconnect attempts.</p>
|
||||
<p>The minimum number of seconds to wait before reconnect attempts.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -625,16 +611,66 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6secureACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/secure" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6secureACSbcACmF">secure</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO16reconnectWaitMaxyACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectWaitMax(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO16reconnectWaitMaxyACSicACmF">reconnectWaitMax(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The maximum 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 swift"><code><span class="k">case</span> <span class="nf">reconnectWaitMax</span><span class="p">(</span><span class="kt">Int</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO19randomizationFactoryACSdcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/randomizationFactor(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO19randomizationFactoryACSdcACmF">randomizationFactor(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The randomization factor for calculating reconnect jitter.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">randomizationFactor</span><span class="p">(</span><span class="kt">Double</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6secureyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/secure(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6secureyACSbcACmF">secure(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -656,16 +692,12 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8securityAcA11SSLSecurityCcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/security" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8securityAcA11SSLSecurityCcACmF">security</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8securityyAcA11SSLSecurityCcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/security(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8securityyAcA11SSLSecurityCcACmF">security(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -687,16 +719,12 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10selfSignedACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/selfSigned" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10selfSignedACSbcACmF">selfSigned</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10selfSignedyACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/selfSigned(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10selfSignedyACSbcACmF">selfSigned(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -718,16 +746,12 @@ over when reconnects happen.</p>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15sessionDelegateACSo010URLSessionF0_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/sessionDelegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15sessionDelegateACSo010URLSessionF0_pcACmF">sessionDelegate</a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15sessionDelegateyACSo012NSURLSessionF0_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/sessionDelegate(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15sessionDelegateyACSo012NSURLSessionF0_pcACmF">sessionDelegate(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -763,9 +787,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11descriptionSSv"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11descriptionSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11descriptionSSv">description</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11descriptionSSvp">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -780,7 +804,7 @@ over when reconnects happen.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -801,9 +825,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO2eeoiSbAC_ACtFZ"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO2eeoiySbAC_ACtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO2eeoiSbAC_ACtFZ">==(_:_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO2eeoiySbAC_ACtFZ">==(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -818,7 +842,7 @@ over when reconnects happen.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -868,8 +892,8 @@ over when reconnects happen.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,8 @@
|
||||
<h1>SocketIOStatus</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOStatus</span> <span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOStatus</span> <span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,6 +201,13 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Cases"></a>
|
||||
<a name="//apple_ref/swift/Section/Cases" class="dashAnchor"></a>
|
||||
<a href="#/Cases">
|
||||
<h3 class="section-name">Cases</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
@@ -219,10 +236,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -250,10 +263,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -281,10 +290,6 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
@@ -326,9 +331,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8IOStatusO6activeSbv"></a>
|
||||
<a name="/s:8SocketIO0A8IOStatusO6activeSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/active" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOStatusO6activeSbv">active</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8IOStatusO6activeSbvp">active</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -342,7 +347,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">active</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">active</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -356,9 +361,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:s23CustomStringConvertibleP11descriptionSSv"></a>
|
||||
<a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSv">description</a>
|
||||
<a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -372,7 +377,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -387,8 +392,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -191,13 +200,20 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Cases"></a>
|
||||
<a name="//apple_ref/swift/Section/Cases" class="dashAnchor"></a>
|
||||
<a href="#/Cases">
|
||||
<h3 class="section-name">Cases</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO16invalidDataArrayA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO16invalidDataArrayyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidDataArray" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO16invalidDataArrayA2CmF">invalidDataArray</a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO16invalidDataArrayyA2CmF">invalidDataArray</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,16 +235,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO13invalidPacketA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO13invalidPacketyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidPacket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO13invalidPacketA2CmF">invalidPacket</a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO13invalidPacketyA2CmF">invalidPacket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -250,16 +262,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeA2CmF"></a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeyA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidPacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeA2CmF">invalidPacketType</a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeyA2CmF">invalidPacketType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -289,8 +297,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+12
-2
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Guides" class="dashAnchor"></a>
|
||||
|
||||
<a title="Guides Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -189,8 +199,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+174
-161
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Protocols" class="dashAnchor"></a>
|
||||
|
||||
<a title="Protocols Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -188,9 +198,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec">SocketEngineSpec</a>
|
||||
<a name="/s:8SocketIO14ConfigSettableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/ConfigSettable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO14ConfigSettableP">ConfigSettable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -198,15 +208,47 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Specifies a SocketEngine.</p>
|
||||
<p>Declares that a type can set configs from a <code><a href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a></code>.</p>
|
||||
|
||||
<a href="Protocols/SocketEngineSpec.html" class="slightly-smaller">See more</a>
|
||||
<a href="Protocols/ConfigSettable.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 swift"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineSpec</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ConfigSettable</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:8SocketIO0A12IOClientSpecP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketIOClientSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP">SocketIOClientSpec</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the interface for a SocketIOClient.</p>
|
||||
|
||||
<a href="Protocols/SocketIOClientSpec.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketIOClientSpec</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -238,7 +280,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -279,6 +322,39 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec">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 swift"><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">
|
||||
@@ -316,9 +392,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketIOClientSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP">SocketIOClientSpec</a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketManagerSpec"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketManagerSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketManagerSpec">SocketManagerSpec</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -326,15 +402,32 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the interface for a SocketIOClient.</p>
|
||||
<p>A manager for a socket.io connection.</p>
|
||||
|
||||
<a href="Protocols/SocketIOClientSpec.html" class="slightly-smaller">See more</a>
|
||||
<p>A <code>SocketManagerSpec</code> is responsible for multiplexing multiple namespaces through a single <code><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></code>.</p>
|
||||
|
||||
<p>Example with <code><a href="Classes/SocketManager.html">SocketManager</a></code>:</p>
|
||||
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">manager</span> <span class="o">=</span> <span class="nf">SocketManager</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="nf">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="k">let</span> <span class="nv">defaultNamespaceSocket</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">defaultSocket</span>
|
||||
<span class="k">let</span> <span class="nv">swiftSocket</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="nf">socket</span><span class="p">(</span><span class="nv">forNamespace</span><span class="p">:</span> <span class="s">"/swift"</span><span class="p">)</span>
|
||||
|
||||
<span class="c1">// defaultNamespaceSocket and swiftSocket both share a single connection to the server</span>
|
||||
</code></pre>
|
||||
|
||||
<p>Sockets created through the manager are retained by the manager. So at the very least, a single strong reference
|
||||
to the manager must be maintained to keep sockets alive.</p>
|
||||
|
||||
<p>To disconnect a socket and remove it from the manager, either call <code><a href="Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)SocketIOClient(im)disconnect">SocketIOClient.disconnect()</a></code> on the socket,
|
||||
or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
|
||||
<a href="Protocols/SocketManagerSpec.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketIOClientSpec</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketManagerSpec</span> <span class="p">:</span> <span class="kt">AnyObject</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineClient.html">SocketEngineClient</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -348,9 +441,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO14ConfigSettableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/ConfigSettable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO14ConfigSettableP">ConfigSettable</a>
|
||||
<a name="/s:8SocketIO0A8ParsableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketParsable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP">SocketParsable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -358,15 +451,75 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Declares that a type can set configs from a <code><a href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a></code>.</p>
|
||||
<p>Defines that a type will be able to parse socket.io-protocol messages.</p>
|
||||
|
||||
<a href="Protocols/ConfigSettable.html" class="slightly-smaller">See more</a>
|
||||
<a href="Protocols/SocketParsable.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ConfigSettable</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14DataBufferableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketDataBufferable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14DataBufferableP">SocketDataBufferable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Says that a type will be able to buffer binary data before all data for an event has come in.</p>
|
||||
|
||||
<a href="Protocols/SocketDataBufferable.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketDataBufferable</span> <span class="p">:</span> <span class="kt">AnyObject</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:8SocketIO0A6LoggerP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketLogger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP">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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketLogger</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -420,154 +573,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6LoggerP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketLogger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP">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 swift"><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:8SocketIO0A8ParsableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketParsable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP">SocketParsable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines that a type will be able to parse socket.io-protocol messages.</p>
|
||||
|
||||
<a href="Protocols/SocketParsable.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14DataBufferableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketDataBufferable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14DataBufferableP">SocketDataBufferable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Says that a type will be able to buffer binary data before all data for an event has come in.</p>
|
||||
|
||||
<a href="Protocols/SocketDataBufferable.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketDataBufferable</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="/c:@M@SocketIO@objc(pl)SocketManagerSpec"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketManagerSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketManagerSpec">SocketManagerSpec</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A manager for a socket.io connection.</p>
|
||||
|
||||
<p>A <code>SocketManagerSpec</code> is responsible for multiplexing multiple namespaces through a single <code><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></code>.</p>
|
||||
|
||||
<p>Example with <code><a href="Classes/SocketManager.html">SocketManager</a></code>:</p>
|
||||
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">manager</span> <span class="o">=</span> <span class="nf">SocketManager</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="nf">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="k">let</span> <span class="nv">defaultNamespaceSocket</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="n">defaultSocket</span>
|
||||
<span class="k">let</span> <span class="nv">swiftSocket</span> <span class="o">=</span> <span class="n">manager</span><span class="o">.</span><span class="nf">socket</span><span class="p">(</span><span class="nv">forNamespace</span><span class="p">:</span> <span class="s">"/swift"</span><span class="p">)</span>
|
||||
|
||||
<span class="c1">// defaultNamespaceSocket and swiftSocket both share a single connection to the server</span>
|
||||
</code></pre>
|
||||
|
||||
<p>Sockets created through the manager are retained by the manager. So at the very least, a single strong reference
|
||||
to the manager must be maintained to keep sockets alive.</p>
|
||||
|
||||
<p>To disconnect a socket and remove it from the manager, either call <code><a href="Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)SocketIOClient(im)disconnect">SocketIOClient.disconnect()</a></code> on the socket,
|
||||
or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
|
||||
<a href="Protocols/SocketManagerSpec.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 swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketManagerSpec</span> <span class="p">:</span> <span class="kd">class</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineClient.html">SocketEngineClient</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO14ConfigSettableP10setConfigsyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="/s:8SocketIO14ConfigSettableP10setConfigsyyAA0A21IOClientConfigurationVF"></a>
|
||||
<a name="//apple_ref/swift/Method/setConfigs(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO14ConfigSettableP10setConfigsyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO14ConfigSettableP10setConfigsyyAA0A21IOClientConfigurationVF">setConfigs(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -253,8 +262,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -255,8 +264,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,7 @@
|
||||
<h1>SocketDataBufferable</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketDataBufferable</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketDataBufferable</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14DataBufferableP14waitingPacketsSayAA0A6PacketVGv"></a>
|
||||
<a name="/s:8SocketIO0A14DataBufferableP14waitingPacketsSayAA0A6PacketVGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingPackets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14DataBufferableP14waitingPacketsSayAA0A6PacketVGv">waitingPackets</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14DataBufferableP14waitingPacketsSayAA0A6PacketVGvp">waitingPackets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -224,7 +233,7 @@ So this should ideally be an array of one packet waiting for data.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingPackets</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketPacket.html">SocketPacket</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingPackets</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketPacket.html">SocketPacket</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -239,8 +248,8 @@ So this should ideally be an array of one packet waiting for data.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,8 @@
|
||||
<h1>SocketEngineClient</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -483,6 +493,52 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidWebsocketUpgradeWithHeaders:"></a>
|
||||
<a name="//apple_ref/swift/Method/engineDidWebsocketUpgrade(headers:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidWebsocketUpgradeWithHeaders:">engineDidWebsocketUpgrade(headers:)</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 when upgrading the http connection to a websocket connection.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">engineDidWebsocketUpgrade</span><span class="p">(</span><span class="nv">headers</span><span class="p">:</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>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>headers</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The http headers.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -491,8 +547,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP11invalidatedSbv"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP11invalidatedSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/invalidated" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP11invalidatedSbv">invalidated</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP11invalidatedSbvp">invalidated</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,7 +228,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">invalidated</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">invalidated</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -229,9 +238,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP8postWaitSaySSGv"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP8postWaitSaySS3msg_yycSg10completiontGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP8postWaitSaySSGv">postWait</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP8postWaitSaySS3msg_yycSg10completiontGvp">postWait</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -248,7 +257,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">postWait</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Typealiases.html#/s:8SocketIO4Posta">Post</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -258,9 +267,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgv"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP7sessionSo12NSURLSessionCSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgv">session</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP7sessionSo12NSURLSessionCSgvp">session</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -275,7 +284,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">session</span><span class="p">:</span> <span class="nf">URLSession</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -285,9 +294,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPollSbv"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPollSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPoll" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPollSbv">waitingForPoll</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPollSbvp">waitingForPoll</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -305,7 +314,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingForPoll</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingForPoll</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,9 +324,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPostSbv"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPostSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPost" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPostSbv">waitingForPost</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPostSbvp">waitingForPost</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -335,7 +344,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingForPost</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">waitingForPost</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -395,9 +404,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP15sendPollMessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendPollMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP15sendPollMessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF">sendPollMessage(_:withType:withData:)</a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP15sendPollMessage_8withType0H4Data10completionySS_AA0ac6PacketI0OSay10Foundation0J0VGyycSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendPollMessage(_:withType:withData:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP15sendPollMessage_8withType0H4Data10completionySS_AA0ac6PacketI0OSay10Foundation0J0VGyycSgtF">sendPollMessage(_:withType:withData:completion:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -424,7 +433,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -517,8 +526,8 @@ disconnect us.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,8 @@
|
||||
<h1>SocketEngineSpec</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineSpec</span></code></pre>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -219,7 +229,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">client</span><span class="p">:</span> <span class="nf">SocketEngineClient</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -246,7 +256,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">closed</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">closed</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -273,7 +283,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">compress</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">compress</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -300,7 +310,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">connected</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">connected</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -327,7 +337,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">connectParams</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">connectParams</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -354,7 +364,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">cookies</span><span class="p">:</span> <span class="p">[</span><span class="kt">HTTPCookie</span><span class="p">]?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">cookies</span><span class="p">:</span> <span class="p">[</span><span class="kt">HTTPCookie</span><span class="p">]?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -381,7 +391,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">engineQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">engineQueue</span><span class="p">:</span> <span class="nf">DispatchQueue</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -408,7 +418,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">extraHeaders</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">extraHeaders</span><span class="p">:</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="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -435,7 +445,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">fastUpgrade</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">fastUpgrade</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -462,7 +472,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forcePolling</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forcePolling</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -489,7 +499,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forceWebsockets</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forceWebsockets</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -516,7 +526,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">polling</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">polling</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -543,7 +553,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">probing</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">probing</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -570,7 +580,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">sid</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">sid</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -597,7 +607,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">socketPath</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">socketPath</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -624,7 +634,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">urlPolling</span><span class="p">:</span> <span class="kt">URL</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">urlPolling</span><span class="p">:</span> <span class="nf">URL</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -651,7 +661,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">urlWebSocket</span><span class="p">:</span> <span class="kt">URL</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">urlWebSocket</span><span class="p">:</span> <span class="nf">URL</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -678,7 +688,8 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">websocket</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@available(*, deprecated, message: "No longer needed, if we're not polling, then we must be doing websockets")</span>
|
||||
<span class="k">var</span> <span class="nv">websocket</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -705,7 +716,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="nf">WebSocket</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -743,7 +754,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></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">options</span><span class="p">:</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>
|
||||
<pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></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">options</span><span class="p">:</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>
|
||||
@@ -1059,9 +1070,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)write:withType:withData:"></a>
|
||||
<a name="//apple_ref/swift/Method/write(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)write:withType:withData:">write(_:withType:withData:)</a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)write:withType:withData:completion:"></a>
|
||||
<a name="//apple_ref/swift/Method/write(_:withType:withData:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)write:withType:withData:completion:">write(_:withType:withData:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1076,7 +1087,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">write</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> <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">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">])</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">write</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> <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">data</span><span class="p">:</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></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1120,6 +1131,18 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1134,8 +1157,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketP07sendWebA7MessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendWebSocketMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketP07sendWebA7MessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF">sendWebSocketMessage(_:withType:withData:)</a>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketP07sendWebA7Message_8withType0H4Data10completionySS_AA0ac6PacketI0OSay10Foundation0J0VGyycSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendWebSocketMessage(_:withType:withData:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketP07sendWebA7Message_8withType0H4Data10completionySS_AA0ac6PacketI0OSay10Foundation0J0VGyycSgtF">sendWebSocketMessage(_:withType:withData:completion:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -231,7 +240,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -275,6 +284,18 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -289,8 +310,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,7 @@
|
||||
<h1>SocketIOClientSpec</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketIOClientSpec</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketIOClientSpec</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP10anyHandleryAA0A8AnyEventCcSgv"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP10anyHandleryAA0A8AnyEventCcSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/anyHandler" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP10anyHandleryAA0A8AnyEventCcSgv">anyHandler</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP10anyHandleryAA0A8AnyEventCcSgvp">anyHandler</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,7 +228,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">anyHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">anyHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt"><a href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">())?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -229,9 +238,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP8handlersSayAA0A12EventHandlerVGv"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP8handlersSayAA0A12EventHandlerVGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/handlers" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP8handlersSayAA0A12EventHandlerVGv">handlers</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP8handlersSayAA0A12EventHandlerVGvp">handlers</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -246,7 +255,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">handlers</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketEventHandler.html">SocketEventHandler</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">handlers</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketEventHandler.html">SocketEventHandler</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -256,9 +265,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7managerAA0a7ManagerD0_pSgv"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7managerAA0a7ManagerD0_pSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/manager" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7managerAA0a7ManagerD0_pSgv">manager</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7managerAA0a7ManagerD0_pSgvp">manager</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -273,7 +282,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">manager</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketManagerSpec.html">SocketManagerSpec</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">manager</span><span class="p">:</span> <span class="nf">SocketManagerSpec</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -283,9 +292,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3nspSSv"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3nspSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/nsp" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3nspSSv">nsp</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3nspSSvp">nsp</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -302,7 +311,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">nsp</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -312,9 +321,42 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP6statusAA0A8IOStatusOv"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP11rawEmitViewAA0a3RawG0Cvp"></a>
|
||||
<a name="//apple_ref/swift/Property/rawEmitView" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11rawEmitViewAA0a3RawG0Cvp">rawEmitView</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A view into this socket where emits do not check for binary data.</p>
|
||||
|
||||
<p>Usage:</p>
|
||||
<pre class="highlight swift"><code><span class="n">socket</span><span class="o">.</span><span class="n">rawEmitView</span><span class="o">.</span><span class="nf">emit</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">,</span> <span class="n">myObject</span><span class="p">)</span>
|
||||
</code></pre>
|
||||
|
||||
<p><strong>NOTE</strong>: It is not safe to hold on to this view beyond the life of the socket.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">rawEmitView</span><span class="p">:</span> <span class="nf">SocketRawView</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP6statusAA0A8IOStatusOvp"></a>
|
||||
<a name="//apple_ref/swift/Property/status" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP6statusAA0A8IOStatusOv">status</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP6statusAA0A8IOStatusOvp">status</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -329,7 +371,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketIOStatus.html">SocketIOStatus</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="nf">SocketIOStatus</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -360,7 +402,7 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Connect to the server. The same as calling <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP7connectySd12timeoutAfter_yycSg11withHandlertF">connect(timeoutAfter:withHandler:)</a></code> with a timeout of 0.</p>
|
||||
<p>Connect to the server. The same as calling <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP7connect12timeoutAfter11withHandlerySd_yycSgtF">connect(timeoutAfter:withHandler:)</a></code> with a timeout of 0.</p>
|
||||
|
||||
<p>Only call after adding your event listeners, unless you know what you’re doing.</p>
|
||||
|
||||
@@ -379,9 +421,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7connectySd12timeoutAfter_yycSg11withHandlertF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7connect12timeoutAfter11withHandlerySd_yycSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/connect(timeoutAfter:withHandler:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7connectySd12timeoutAfter_yycSg11withHandlertF">connect(timeoutAfter:withHandler:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7connect12timeoutAfter11withHandlerySd_yycSgtF">connect(timeoutAfter:withHandler:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -440,9 +482,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP10didConnectySS11toNamespace_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP10didConnect11toNamespaceySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/didConnect(toNamespace:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP10didConnectySS11toNamespace_tF">didConnect(toNamespace:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP10didConnect11toNamespaceySS_tF">didConnect(toNamespace:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -487,9 +529,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP13didDisconnectySS6reason_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP13didDisconnect6reasonySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/didDisconnect(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP13didDisconnectySS6reason_tF">didDisconnect(reason:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP13didDisconnect6reasonySS_tF">didDisconnect(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -533,9 +575,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP8didErrorySS6reason_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP8didError6reasonySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/didError(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP8didErrorySS6reason_tF">didError(reason:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP8didError6reasonySS_tF">didError(reason:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -614,9 +656,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4emitySS_SayAA0A4Data_pGdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4emitySS_SayAA0A4Data_pGdtF">emit(_:_:)</a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4emit__10completionySS_AA0A4Data_pdyycSgtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emit(_:_:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4emit__10completionySS_AA0A4Data_pdyycSgtF">emit(_:_:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -624,9 +666,9 @@ then this is only called when the client connects to that namespace.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Send an event to the server, with optional data items.</p>
|
||||
<p>Send an event to the server, with optional data items and optional write completion handler.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
@@ -634,7 +676,7 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">SocketData</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">emit</span><span class="p">(</span><span class="n">_</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketData.html">SocketData</a></span><span class="o">...</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></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -666,6 +708,18 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Callback called on transport write completion.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -675,9 +729,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7emitAckySi_SayypG4withtF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP7emitAck_4withySi_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitAck(_:with:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7emitAckySi_SayypG4withtF">emitAck(_:with:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP7emitAck_4withySi_SayypGtF">emitAck(_:with:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -733,9 +787,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP11emitWithAckAA02OnG8CallbackCSS_SayAA0A4Data_pGdtF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF"></a>
|
||||
<a name="//apple_ref/swift/Method/emitWithAck(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11emitWithAckAA02OnG8CallbackCSS_SayAA0A4Data_pGdtF">emitWithAck(_:_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -748,7 +802,7 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<p><strong>NOTE</strong>: 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.</p>
|
||||
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
<p>If an error occurs trying to transform <code>items</code> into their socket representation, a <code><a href="../Enums/SocketClientEvent.html#/s:8SocketIO0A11ClientEventO5erroryA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[eventName, items, theError]</code></p>
|
||||
|
||||
<p>Example:</p>
|
||||
@@ -807,9 +861,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP9handleAckySi_SayypG4datatF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP9handleAck_4dataySi_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/handleAck(_:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP9handleAckySi_SayypG4datatF">handleAck(_:data:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP9handleAck_4dataySi_SayypGtF">handleAck(_:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -865,9 +919,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP17handleClientEventyAA0afG0O_SayypG4datatF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP17handleClientEvent_4datayAA0afG0O_SayypGtF"></a>
|
||||
<a name="//apple_ref/swift/Method/handleClientEvent(_:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP17handleClientEventyAA0afG0O_SayypG4datatF">handleClientEvent(_:data:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP17handleClientEvent_4datayAA0afG0O_SayypGtF">handleClientEvent(_:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -923,9 +977,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP11handleEventySS_SayypG4dataSb17isInternalMessageSi7withAcktF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP11handleEvent_4data17isInternalMessage7withAckySS_SayypGSbSitF"></a>
|
||||
<a name="//apple_ref/swift/Method/handleEvent(_:data:isInternalMessage:withAck:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11handleEventySS_SayypG4dataSb17isInternalMessageSi7withAcktF">handleEvent(_:data:isInternalMessage:withAck:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11handleEvent_4data17isInternalMessage7withAckySS_SayypGSbSitF">handleEvent(_:data:isInternalMessage:withAck:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1005,9 +1059,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP12handlePacketyAA0aF0VF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP12handlePacketyyAA0aF0VF"></a>
|
||||
<a name="//apple_ref/swift/Method/handlePacket(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP12handlePacketyAA0aF0VF">handlePacket(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP12handlePacketyyAA0aF0VF">handlePacket(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1089,7 +1143,7 @@ socket.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Joins <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3nspSSv">nsp</a></code>.</p>
|
||||
<p>Joins <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3nspSSvp">nsp</a></code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1106,9 +1160,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3offyAA0A11ClientEventO06clientG0_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3off11clientEventyAA0a6ClientG0O_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/off(clientEvent:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3offyAA0A11ClientEventO06clientG0_tF">off(clientEvent:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3off11clientEventyAA0a6ClientG0O_tF">off(clientEvent:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1118,7 +1172,7 @@ socket.</p>
|
||||
<div class="abstract">
|
||||
<p>Removes handler(s) for a client event.</p>
|
||||
|
||||
<p>If you wish to remove a client event handler, call the <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3offy10Foundation4UUIDV2id_tF">off(id:)</a></code> with the UUID received from its <code>on</code> call.</p>
|
||||
<p>If you wish to remove a client event handler, call the <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3off2idy10Foundation4UUIDV_tF">off(id:)</a></code> with the UUID received from its <code>on</code> call.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1154,9 +1208,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3offySSF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3offyySSF"></a>
|
||||
<a name="//apple_ref/swift/Method/off(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3offySSF">off(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3offyySSF">off(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1166,7 +1220,7 @@ socket.</p>
|
||||
<div class="abstract">
|
||||
<p>Removes handler(s) based on an event name.</p>
|
||||
|
||||
<p>If you wish to remove a specific event, call the <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3offy10Foundation4UUIDV2id_tF">off(id:)</a></code> with the UUID received from its <code>on</code> call.</p>
|
||||
<p>If you wish to remove a specific event, call the <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3off2idy10Foundation4UUIDV_tF">off(id:)</a></code> with the UUID received from its <code>on</code> call.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1202,9 +1256,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3offy10Foundation4UUIDV2id_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP3off2idy10Foundation4UUIDV_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/off(id:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3offy10Foundation4UUIDV2id_tF">off(id:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP3off2idy10Foundation4UUIDV_tF">off(id:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1214,7 +1268,7 @@ socket.</p>
|
||||
<div class="abstract">
|
||||
<p>Removes a handler with the specified UUID gotten from an <code>on</code> or <code>once</code></p>
|
||||
|
||||
<p>If you want to remove all events for an event, call the off <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3offySSF">off(_:)</a></code> method with the event name.</p>
|
||||
<p>If you want to remove all events for an event, call the off <code><a href="../Protocols/SocketIOClientSpec.html#/s:8SocketIO0A12IOClientSpecP3offyySSF">off(_:)</a></code> method with the event name.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -1250,9 +1304,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP2on10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP2on_8callback10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/on(_:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP2on10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtc8callbacktF">on(_:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP2on_8callback10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtctF">on(_:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1312,9 +1366,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP2on10Foundation4UUIDVAA0A11ClientEventO06clientI0_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP2on11clientEvent8callback10Foundation4UUIDVAA0a6ClientG0O_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/on(clientEvent:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP2on10Foundation4UUIDVAA0A11ClientEventO06clientI0_ySayypG_AA0A10AckEmitterCtc8callbacktF">on(clientEvent:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP2on11clientEvent8callback10Foundation4UUIDVAA0a6ClientG0O_ySayypG_AA0A10AckEmitterCtctF">on(clientEvent:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1380,9 +1434,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4once10Foundation4UUIDVAA0A11ClientEventO06clientI0_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4once11clientEvent8callback10Foundation4UUIDVAA0a6ClientG0O_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/once(clientEvent:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4once10Foundation4UUIDVAA0A11ClientEventO06clientI0_ySayypG_AA0A10AckEmitterCtc8callbacktF">once(clientEvent:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4once11clientEvent8callback10Foundation4UUIDVAA0a6ClientG0O_ySayypG_AA0A10AckEmitterCtctF">once(clientEvent:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1442,9 +1496,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4once10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtc8callbacktF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP4once_8callback10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtctF"></a>
|
||||
<a name="//apple_ref/swift/Method/once(_:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4once10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtc8callbacktF">once(_:callback:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4once_8callback10Foundation4UUIDVSS_ySayypG_AA0A10AckEmitterCtctF">once(_:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1504,9 +1558,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP5onAnyyyAA0aF5EventCcF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP5onAnyyyyAA0aF5EventCcF"></a>
|
||||
<a name="//apple_ref/swift/Method/onAny(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP5onAnyyyAA0aF5EventCcF">onAny(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP5onAnyyyyAA0aF5EventCcF">onAny(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1579,9 +1633,9 @@ socket.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP15setReconnectingySS6reason_tF"></a>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP15setReconnecting6reasonySS_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/setReconnecting(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP15setReconnectingySS6reason_tF">setReconnecting(reason:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP15setReconnecting6reasonySS_tF">setReconnecting(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1614,8 +1668,8 @@ Called when the manager detects a broken connection, or when a manual reconnect
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,7 @@
|
||||
<h1>SocketLogger</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketLogger</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6LoggerP3logSbv"></a>
|
||||
<a name="/s:8SocketIO0A6LoggerP3logSbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/log" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3logSbv">log</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3logSbvp">log</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,7 +228,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">log</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">log</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,9 +249,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6LoggerP3logySSyXK_SS4typetF"></a>
|
||||
<a name="/s:8SocketIO0A6LoggerP3log_4typeySSyXK_SStF"></a>
|
||||
<a name="//apple_ref/swift/Method/log(_:type:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3logySSyXK_SS4typetF">log(_:type:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3log_4typeySSyXK_SStF">log(_:type:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -318,9 +327,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6LoggerP5errorySSyXK_SS4typetF"></a>
|
||||
<a name="/s:8SocketIO0A6LoggerP5error_4typeySSyXK_SStF"></a>
|
||||
<a name="//apple_ref/swift/Method/error(_:type:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP5errorySSyXK_SS4typetF">error(_:type:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP5error_4typeySSyXK_SStF">error(_:type:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -401,8 +410,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,8 @@
|
||||
<h1>SocketManagerSpec</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketManagerSpec</span> <span class="p">:</span> <span class="kd">class</span><span class="p">,</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">@objc</span>
|
||||
<span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketManagerSpec</span> <span class="p">:</span> <span class="kt">AnyObject</span><span class="p">,</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -235,7 +245,7 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultSocket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">defaultSocket</span><span class="p">:</span> <span class="nf">SocketIOClient</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -262,7 +272,7 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">engine</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">engine</span><span class="p">:</span> <span class="nf">SocketEngineSpec</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -289,7 +299,7 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forceNew</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">forceNew</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -317,7 +327,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">handleQueue</span><span class="p">:</span> <span class="kt">DispatchQueue</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">handleQueue</span><span class="p">:</span> <span class="nf">DispatchQueue</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -344,7 +354,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">nsps</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">nsps</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -371,7 +381,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reconnects</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reconnects</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -391,14 +401,68 @@ called on.</p>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The number of seconds to wait before attempting to reconnect.</p>
|
||||
<p>The minimum number of seconds to wait before attempting to reconnect.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reconnectWait</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reconnectWait</span><span class="p">:</span> <span class="nf">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketManagerSpec(py)reconnectWaitMax"></a>
|
||||
<a name="//apple_ref/swift/Property/reconnectWaitMax" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketManagerSpec(py)reconnectWaitMax">reconnectWaitMax</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The maximum number of seconds to wait before attempting to reconnect.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">reconnectWaitMax</span><span class="p">:</span> <span class="nf">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketManagerSpec(py)randomizationFactor"></a>
|
||||
<a name="//apple_ref/swift/Property/randomizationFactor" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketManagerSpec(py)randomizationFactor">randomizationFactor</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The randomization factor for calculating reconnect jitter.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">randomizationFactor</span><span class="p">:</span> <span class="nf">Double</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -425,7 +489,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">socketURL</span><span class="p">:</span> <span class="nf">URL</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -452,7 +516,7 @@ called on.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="kt"><a href="../Enums/SocketIOStatus.html">SocketIOStatus</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">status</span><span class="p">:</span> <span class="nf">SocketIOStatus</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -816,7 +880,8 @@ After calling this method the socket should no longer be considered usable.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><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>
|
||||
<pre class="highlight swift"><code><span class="kd">@discardableResult</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>
|
||||
@@ -910,8 +975,8 @@ Or call <code><a href="../Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)Soc
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,7 @@
|
||||
<h1>SocketParsable</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8ParsableP15parseBinaryDataAA0A6PacketVSg10Foundation0F0VF"></a>
|
||||
<a name="/s:8SocketIO0A8ParsableP15parseBinaryDatayAA0A6PacketVSg10Foundation0F0VF"></a>
|
||||
<a name="//apple_ref/swift/Method/parseBinaryData(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP15parseBinaryDataAA0A6PacketVSg10Foundation0F0VF">parseBinaryData(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP15parseBinaryDatayAA0A6PacketVSg10Foundation0F0VF">parseBinaryData(_:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -264,9 +273,9 @@ into the correct placeholder.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8ParsableP05parseA7MessageAA0A6PacketVSgSSF"></a>
|
||||
<a name="/s:8SocketIO0A8ParsableP05parseA7MessageyAA0A6PacketVSgSSF"></a>
|
||||
<a name="//apple_ref/swift/Method/parseSocketMessage(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP05parseA7MessageAA0A6PacketVSgSSF">parseSocketMessage(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP05parseA7MessageyAA0A6PacketVSgSSF">parseSocketMessage(_:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -327,8 +336,8 @@ into the correct placeholder.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+12
-2
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>
|
||||
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -285,8 +295,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV5eventSSv"></a>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV5eventSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV5eventSSv">event</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV5eventSSvp">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -229,9 +238,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVv"></a>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVvp"></a>
|
||||
<a name="//apple_ref/swift/Property/id" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVv">id</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVvp">id</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -256,9 +265,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcv"></a>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV8callbackyySayypG_AA0A10AckEmitterCtcvp"></a>
|
||||
<a name="//apple_ref/swift/Property/callback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcv">callback</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV8callbackyySayypG_AA0A10AckEmitterCtcvp">callback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -294,9 +303,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV15executeCallbackySayypG4with_Si0G3AckAA0A8IOClientC0gA0tF"></a>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV15executeCallback4with0G3Ack0gA0ySayypG_SiAA0A8IOClientCtF"></a>
|
||||
<a name="//apple_ref/swift/Method/executeCallback(with:withAck:withSocket:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV15executeCallbackySayypG4with_Si0G3AckAA0A8IOClientC0gA0tF">executeCallback(with:withAck:withSocket:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV15executeCallback4with0G3Ack0gA0ySayypG_SiAA0A8IOClientCtF">executeCallback(with:withAck:withSocket:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -369,8 +378,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -300,7 +309,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><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>
|
||||
@@ -321,9 +330,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV10startIndexSivp"></a>
|
||||
<a name="//apple_ref/swift/Property/startIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv">startIndex</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV10startIndexSivp">startIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -338,7 +347,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">startIndex</span><span class="p">:</span> <span class="nf">Index</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -348,9 +357,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV8endIndexSivp"></a>
|
||||
<a name="//apple_ref/swift/Property/endIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv">endIndex</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV8endIndexSivp">endIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -365,7 +374,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">endIndex</span><span class="p">:</span> <span class="nf">Index</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -375,9 +384,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV7isEmptySbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/isEmpty" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv">isEmpty</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbvp">isEmpty</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -392,7 +401,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isEmpty</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -402,9 +411,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5countSiv"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5countSivp"></a>
|
||||
<a name="//apple_ref/swift/Property/count" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5countSiv">count</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5countSivp">count</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -419,7 +428,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="o">.</span><span class="kt">Stride</span></code></pre>
|
||||
<pre class="highlight swift"><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:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="o">.</span><span class="nf">Stride</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -429,9 +438,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgvp"></a>
|
||||
<a name="//apple_ref/swift/Property/first" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv">first</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgvp">first</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -446,7 +455,59 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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:8SocketIO0A21IOClientConfigurationV7Elementa">Element</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">first</span><span class="p">:</span> <span class="nf">Element</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:Sly7ElementQz5IndexQzcip"></a>
|
||||
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:Sly7ElementQz5IndexQzcip">subscript(_:)</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 swift"><code><span class="kd">public</span> <span class="nf">subscript</span><span class="p">(</span><span class="nv">position</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="p">)</span> <span class="o">-></span> <span class="nf">Element</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:Sly11SubSequenceQzSny5IndexQzGcip"></a>
|
||||
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:Sly11SubSequenceQzSny5IndexQzGcip">subscript(_:)</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 swift"><code><span class="kd">public</span> <span class="nf">subscript</span><span class="p">(</span><span class="nv">bounds</span><span class="p">:</span> <span class="kt">Range</span><span class="o"><</span><span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="o">></span><span class="p">)</span> <span class="o">-></span> <span class="nf">SubSequence</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -467,9 +528,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationVACSayAA0aC6OptionOG12arrayLiterald_tcfc"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV12arrayLiteralAcA0aC6OptionOd_tcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationVACSayAA0aC6OptionOG12arrayLiterald_tcfc">init(arrayLiteral:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV12arrayLiteralAcA0aC6OptionOd_tcfc">init(arrayLiteral:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -555,9 +616,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5indexS2i5after_tF"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5index5afterS2i_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/index(after:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5indexS2i5after_tF">index(after:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5index5afterS2i_tF">index(after:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -585,9 +646,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV6insertyAA0aC6OptionO_Sb9replacingtF"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV6insert_9replacingyAA0aC6OptionO_SbtF"></a>
|
||||
<a name="//apple_ref/swift/Method/insert(_:replacing:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV6insertyAA0aC6OptionO_Sb9replacingtF">insert(_:replacing:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV6insert_9replacingyAA0aC6OptionO_SbtF">insert(_:replacing:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -648,8 +709,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -202,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV3nspSSv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV3nspSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/nsp" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV3nspSSv">nsp</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV3nspSSvp">nsp</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -229,9 +238,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV2idSiv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV2idSivp"></a>
|
||||
<a name="//apple_ref/swift/Property/id" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV2idSiv">id</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV2idSivp">id</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -256,9 +265,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4typeAC0C4TypeOv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV4typeAC0C4TypeOvp"></a>
|
||||
<a name="//apple_ref/swift/Property/type" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4typeAC0C4TypeOv">type</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4typeAC0C4TypeOvp">type</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -283,9 +292,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/binary" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv">binary</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGvp">binary</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -300,7 +309,9 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">binary</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">binary</span><span class="p">:</span> <span class="p">[</span><span class="kt">Data</span><span class="p">]</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -310,9 +321,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4dataSayypGv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV4dataSayypGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/data" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4dataSayypGv">data</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4dataSayypGvp">data</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -330,7 +341,9 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">internal(set)</span> <span class="k">var</span> <span class="nv">data</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span> <span class="p">{</span>
|
||||
<span class="k">get</span>
|
||||
<span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -340,9 +353,9 @@ event type packets.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4argsSayypGv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV4argsSayypGvp"></a>
|
||||
<a name="//apple_ref/swift/Property/args" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4argsSayypGv">args</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4argsSayypGvp">args</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -357,7 +370,7 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">args</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">args</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -367,9 +380,9 @@ event type packets.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV11descriptionSSv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV11descriptionSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV11descriptionSSv">description</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV11descriptionSSvp">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -384,7 +397,7 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><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>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -394,9 +407,9 @@ event type packets.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV5eventSSv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV5eventSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV5eventSSv">event</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV5eventSSvp">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -411,7 +424,7 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">event</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -421,9 +434,9 @@ event type packets.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV12packetStringSSv"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV12packetStringSSvp"></a>
|
||||
<a name="//apple_ref/swift/Property/packetString" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV12packetStringSSv">packetString</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV12packetStringSSvp">packetString</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -438,7 +451,7 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">packetString</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">packetString</span><span class="p">:</span> <span class="nf">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -477,7 +490,7 @@ event type packets.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">PacketType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">PacketType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -492,8 +505,8 @@ event type packets.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -79,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -168,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,7 +188,7 @@
|
||||
<h1>PacketType</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">PacketType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
<pre class="highlight swift"><code><span class="kd">enum</span> <span class="kt">PacketType</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -191,13 +200,20 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Cases"></a>
|
||||
<a name="//apple_ref/swift/Section/Cases" class="dashAnchor"></a>
|
||||
<a href="#/Cases">
|
||||
<h3 class="section-name">Cases</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO7connectyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF">connect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO7connectyA2EmF">connect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,16 +235,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO10disconnectyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/disconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF">disconnect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO10disconnectyA2EmF">disconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -250,16 +262,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5eventyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF">event</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5eventyA2EmF">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -281,16 +289,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO3ackyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/ack" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF">ack</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO3ackyA2EmF">ack</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -312,16 +316,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5erroryA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/error" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF">error</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5erroryA2EmF">error</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -343,16 +343,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO11binaryEventyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/binaryEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF">binaryEvent</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventyA2EmF">binaryEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -374,16 +370,12 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF"></a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO9binaryAckyA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/binaryAck" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF">binaryAck</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckyA2EmF">binaryAck</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -407,14 +399,52 @@
|
||||
</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:8SocketIO0A6PacketV0C4TypeO8isBinarySbvp"></a>
|
||||
<a name="//apple_ref/swift/Property/isBinary" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO8isBinarySbvp">isBinary</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Whether or not this type is binary</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isBinary</span><span class="p">:</span> <span class="nf">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+39
-2
@@ -14,6 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Section/Type Aliases" class="dashAnchor"></a>
|
||||
|
||||
<a title="Type Aliases Reference"></a>
|
||||
|
||||
@@ -78,6 +79,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +174,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -239,6 +249,33 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO4Posta"></a>
|
||||
<a name="//apple_ref/swift/Alias/Post" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO4Posta">Post</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 queued POST</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Post</span> <span class="o">=</span> <span class="p">(</span><span class="nv">msg</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></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -247,8 +284,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+11
-2
@@ -78,6 +78,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +173,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -223,8 +232,8 @@ will be released, along with the socket, and its memory reclaimed.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+17
-8
@@ -78,6 +78,12 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketManager.html">SocketManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawAckView.html">SocketRawAckView</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketRawView.html">SocketRawView</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
@@ -167,6 +173,9 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO4Posta">Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -239,10 +248,10 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
|
||||
<p>Checkout the <a href="https://nuclearace.github.io/Socket.IO-Client-Swift/faq.html">FAQs</a> for commonly asked questions.</p>
|
||||
|
||||
<p>Checkout the <a href="https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html">12to13</a> guide for migrating to v13.</p>
|
||||
<p>Checkout the <a href="https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html">12to13</a> guide for migrating to v13+ from v12 below.</p>
|
||||
<h2 id='installation' class='heading'>Installation</h2>
|
||||
|
||||
<p>Requires Swift 4/Xcode 9.x</p>
|
||||
<p>Requires Swift 4/5 and Xcode 10.x</p>
|
||||
|
||||
<p>If you need Swift 2.3 use the <a href="https://github.com/socketio/socket.io-client-swift/releases/tag/swift2.3">swift2.3 tag</a> (Pre-Swift 4 support is no longer maintained)</p>
|
||||
|
||||
@@ -250,7 +259,7 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
<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="c1">// swift-tools-version:4.0</span>
|
||||
<pre class="highlight swift"><code><span class="c1">// swift-tools-version:4.2</span>
|
||||
|
||||
<span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||
|
||||
@@ -260,7 +269,7 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
<span class="o">.</span><span class="nf">executable</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="s">"socket.io-test"</span><span class="p">,</span> <span class="nv">targets</span><span class="p">:</span> <span class="p">[</span><span class="s">"YourTargetName"</span><span class="p">])</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">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="o">.</span><span class="nf">upToNextMinor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"13.1.0"</span><span class="p">))</span>
|
||||
<span class="o">.</span><span class="nf">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="o">.</span><span class="nf">upToNextMinor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"15.0.0"</span><span class="p">))</span>
|
||||
<span class="p">],</span>
|
||||
<span class="nv">targets</span><span class="p">:</span> <span class="p">[</span>
|
||||
<span class="o">.</span><span class="nf">target</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="s">"YourTargetName"</span><span class="p">,</span> <span class="nv">dependencies</span><span class="p">:</span> <span class="p">[</span><span class="s">"SocketIO"</span><span class="p">],</span> <span class="nv">path</span><span class="p">:</span> <span class="s">"./Path/To/Your/Sources"</span><span class="p">)</span>
|
||||
@@ -272,7 +281,7 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
<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" ~> 13.1.0
|
||||
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift" ~> 15.1.0
|
||||
</code></pre>
|
||||
|
||||
<p>Run <code>carthage update --platform ios,macosx</code>.</p>
|
||||
@@ -284,7 +293,7 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
<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">'~> 13.1.0'</span>
|
||||
<span class="n">pod</span> <span class="s1">'Socket.IO-Client-Swift'</span><span class="p">,</span> <span class="s1">'~> 15.1.0'</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
|
||||
@@ -325,8 +334,8 @@ SocketIOClient* socket = manager.defaultSocket;
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2018 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2018-03-11)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2019 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2019-05-28)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.4</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"Typealiases.html#/s:8SocketIO11AckCallbacka":{"name":"AckCallback","abstract":"<p>A typealias for an ack callback.</p>"},"Typealiases.html#/s:8SocketIO14NormalCallbacka":{"name":"NormalCallback","abstract":"<p>A typealias for a normal callback.</p>"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF":{"name":"connect","abstract":"<p>Connect: 0</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF":{"name":"disconnect","abstract":"<p>Disconnect: 1</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF":{"name":"event","abstract":"<p>Event: 2</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF":{"name":"ack","abstract":"<p>Ack: 3</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF":{"name":"error","abstract":"<p>Error: 4</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF":{"name":"binaryEvent","abstract":"<p>Binary Event: 5</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF":{"name":"binaryAck","abstract":"<p>Binary Ack: 6</p>","parent_name":"PacketType"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV3nspSSv":{"name":"nsp","abstract":"<p>The namespace for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV2idSiv":{"name":"id","abstract":"<p>If > 0 then this packet is using acking.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4typeAC0C4TypeOv":{"name":"type","abstract":"<p>The type of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv":{"name":"binary","abstract":"<p>An array of binary data for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4dataSayypGv":{"name":"data","abstract":"<p>The data for this event.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4argsSayypGv":{"name":"args","abstract":"<p>Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV11descriptionSSv":{"name":"description","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV5eventSSv":{"name":"event","abstract":"<p>The event name for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV12packetStringSSv":{"name":"packetString","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket/PacketType.html":{"name":"PacketType","abstract":"<p>The type of packets.</p>","parent_name":"SocketPacket"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa":{"name":"Element","abstract":"<p>Type of element stored.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa":{"name":"Index","abstract":"<p>Index type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8Iteratora":{"name":"Iterator","abstract":"<p>Iterator type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV11SubSequencea":{"name":"SubSequence","abstract":"<p>SubSequence type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv":{"name":"startIndex","abstract":"<p>The start index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv":{"name":"endIndex","abstract":"<p>The end index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv":{"name":"isEmpty","abstract":"<p>Whether this collection is empty.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5countSiv":{"name":"count","abstract":"<p>The number of elements stored in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv":{"name":"first","abstract":"<p>The first element in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClLine truncated
|
||||
{"Typealiases.html#/s:8SocketIO11AckCallbacka":{"name":"AckCallback","abstract":"<p>A typealias for an ack callback.</p>"},"Typealiases.html#/s:8SocketIO14NormalCallbacka":{"name":"NormalCallback","abstract":"<p>A typealias for a normal callback.</p>"},"Typealiases.html#/s:8SocketIO4Posta":{"name":"Post","abstract":"<p>A typealias for a queued POST</p>"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO7connectyA2EmF":{"name":"connect","abstract":"<p>Connect: 0</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO10disconnectyA2EmF":{"name":"disconnect","abstract":"<p>Disconnect: 1</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5eventyA2EmF":{"name":"event","abstract":"<p>Event: 2</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO3ackyA2EmF":{"name":"ack","abstract":"<p>Ack: 3</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5erroryA2EmF":{"name":"error","abstract":"<p>Error: 4</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventyA2EmF":{"name":"binaryEvent","abstract":"<p>Binary Event: 5</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckyA2EmF":{"name":"binaryAck","abstract":"<p>Binary Ack: 6</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO8isBinarySbvp":{"name":"isBinary","abstract":"<p>Whether or not this type is binary</p>","parent_name":"PacketType"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV3nspSSvp":{"name":"nsp","abstract":"<p>The namespace for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV2idSivp":{"name":"id","abstract":"<p>If > 0 then this packet is using acking.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4typeAC0C4TypeOvp":{"name":"type","abstract":"<p>The type of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGvp":{"name":"binary","abstract":"<p>An array of binary data for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4dataSayypGvp":{"name":"data","abstract":"<p>The data for this event.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4argsSayypGvp":{"name":"args","abstract":"<p>Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV11descriptionSSvp":{"name":"description","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV5eventSSvp":{"name":"event","abstract":"<p>The event name for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV12packetStringSSvp":{"name":"packetString","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket/PacketType.html":{"name":"PacketType","abstract":"<p>The type of packets.</p>","parent_name":"SocketPacket"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa":{"name":"Element","abstract":"<p>Type of element stored.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa":{"name":"Index","abstract":"<p>Index type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8Iteratora":{"name":"Iterator","abstract":"<p>Iterator type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV11SubSequencea":{"name":"SubSequence","abstract":"<p>SubSequence type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV10startIndexSivp":{"name":"startIndex","abstract":"<p>The start index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8endIndexSivp":{"name":"endIndex","abstract":"<p>The end index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbvp":{"name":"isEmpty","abstract":"<p>Whether this collection is empty.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5countSivp":{"name":"count","abstract":"<p>The number of elements stored in this collection.</p>","parent_name":"SocketLine truncated
|
||||
Reference in new issue
Block a user