Compare commits

...
64 Commits
Author SHA1 Message Date
Erik Little 36db2ff0eb Merge branch 'development'
* development:
  bump version
  bump travis xcode version
  Fixed endless reconnection loop
2019-10-17 06:32:23 -04:00
Erik Little 046bb0e9ff bump version 2019-10-17 06:32:02 -04:00
Erik Little 0dc4dd4a93 bump travis xcode version 2019-10-17 06:18:42 -04:00
Erik Little cb74f6ca55 Merge branch 'master' into development
* master:
  Updates test
  Adds missing character for url percent encoding
2019-10-17 06:06:26 -04:00
Erik Little 1a0f6bb6ce Merge pull request #1241 from scorealarm/bugfix/adds-missing-character-for-url-encoding
Adds missing character for url encoding
2019-10-17 06:05:38 -04:00
Erik Little 091797f9b7 Merge pull request #1231 from salpeev/fix/reconnection
Fixed endless reconnection loop
2019-10-17 06:03:32 -04:00
Marin Huljev 5611c8ad24 Updates test 2019-10-14 23:02:17 +02:00
Marin Huljev ae54ea01d0 Adds missing character for url percent encoding 2019-10-14 22:06:31 +02:00
Serhii Alpieiev 1db9232d71 Fixed endless reconnection loop 2019-09-07 18:07:19 +03:00
Erik Little 5dcfe18748 bump version and docs 2019-05-28 09:09:24 -04:00
Erik Little 558ea65aa1 Merge branch 'development'
* development:
  update changelog/readme for 15.1
  update changelog
  fix #1178
  expose Starscream WebSocket enableSOCKSProxy option to socket.io-client-swift options
2019-05-28 09:04:09 -04:00
Erik Little 0d44b10734 update changelog/readme for 15.1 2019-05-28 08:55:11 -04:00
Erik Little c1744e9e6f Merge pull request #1049 from pdupris/enableSOCKSProxy
Add enableSOCKSProxy option to pass to Starscream WebSockets
2019-05-28 08:50:11 -04:00
Erik Little 2fd9e4b993 update changelog 2019-03-28 07:17:45 -04:00
Erik Little 44682659b6 fix #1178 2019-03-28 07:11:35 -04:00
Erik Little 148c302474 bump version and docs 2019-03-28 06:29:32 -04:00
Erik Little 6037b85f4b Merge branch 'development'
* development:
  correct beta version in podspec
  beta version
  swift 5
  call closeOutEngine to clean up after a ping timeout
2019-03-28 06:26:13 -04:00
Erik Little bd7428485c correct beta version in podspec 2019-03-26 12:41:23 -04:00
Erik Little 3df38fcff5 beta version 2019-03-26 12:35:31 -04:00
Erik Little 7219906306 swift 5 2019-03-26 12:20:34 -04:00
Erik Little 7e0917c2cd Merge branch 'master' into development
* master:
  bump version and docs
  update readme and changelog for new version
2019-03-26 12:16:58 -04:00
Erik Little 1a8285fcf0 Merge pull request #1159 from cobrowseio/development
Call closeOutEngine to clean up after a ping timeout
2019-02-28 07:16:27 -05:00
Andy fc4e1802f6 call closeOutEngine to clean up after a ping timeout 2019-02-11 19:01:43 +00:00
Erik Little 19a177485d bump version and docs 2019-01-16 08:54:32 -05:00
Erik Little 00aaea935c Merge branch 'development'
* development:
  update readme and changelog for new version
  add changelog entry for exponential backoff
  config setting and test updates for reconnectWaitMax and randomizationFactor
  add configurable exponential backoff
  Fix #1147
  Bump Starscream to 3.0.6
  Update to Swift 4.2
2019-01-16 08:51:31 -05:00
Erik Little 6a3d82c60a update readme and changelog for new version 2019-01-16 08:51:21 -05:00
Erik Little 4c98c24047 Merge pull request #1149 from cobrowseio/development
Add configurable exponential backoff
2019-01-14 14:28:27 -05:00
Andy a17a66af00 add changelog entry for exponential backoff 2019-01-14 19:16:58 +00:00
Andy 9433050588 config setting and test updates for reconnectWaitMax and randomizationFactor 2019-01-12 22:05:01 +00:00
Andy 49b9a07a95 add configurable exponential backoff 2019-01-12 19:44:51 +00:00
Erik Little f407beab99 Fix #1147 2019-01-11 12:39:54 -05:00
Erik Little fa81fc222f Merge pull request #1126 from DmitryPR/swift-update
Swift update
2018-11-28 17:26:46 -05:00
Erik Little 649989fd83 Merge branch 'master' into development
* master:
  bump version
2018-11-28 17:23:34 -05:00
Erik Little f7ef126d97 bump version 2018-11-28 17:14:29 -05:00
Erik Little e4f63e8f15 Merge branch 'development'
* development:
  Remove unnecessary function calls.
  Fix build
  Don’t create empty closures when we don’t need them. Fixes https://github.com/socketio/socket.io-client-swift/issues/1118.
  Propagate http header callback from websocket back to client.
  clean up emit completion code
  update cartfile too
  update deps: Fix #1105
  update xcode settings
  convert SocketData to serialisable socket representation
  Add a variadic method for emit completion handlers in swift
  no need to capture completion hander in wrapper
  wrap completion handler to run on handleQueue
  add optional write completion handler for emit's
2018-11-28 17:08:17 -05:00
Dmitry Preobrazhenskiy 3cfd12b0bc Bump Starscream to 3.0.6
This solves the issue:
https://github.com/socketio/socket.io-client-swift/issues/1105
2018-11-28 23:38:13 +02:00
Dmitry Preobrazhenskiy 94b01420af Update to Swift 4.2
This solves the issue:
https://github.com/socketio/socket.io-client-swift/issues/1101
2018-11-28 23:37:27 +02:00
Erik Little ec86a19fc6 Merge pull request #1119 from vonox7/completion-handler-nil
Don’t create empty closures when we don’t need them
2018-11-07 09:38:22 -05:00
Valentin Slawicek e0cbe59a10 Remove unnecessary function calls. 2018-11-07 13:53:25 +01:00
Valentin Slawicek 8f94c038d8 Fix build 2018-11-07 12:47:55 +01:00
Valentin Slawicek a4b334b6f2 Don’t create empty closures when we don’t need them.
Fixes https://github.com/socketio/socket.io-client-swift/issues/1118.
2018-11-07 12:37:48 +01:00
Erik Little 9708019adc Merge pull request #1112 from vonox7/http-header-callback-rebased
Propagate http header callback from websocket back to client (rebased)
2018-10-18 10:57:00 -04:00
Valentin Slawicek 5a6a4f02d9 Propagate http header callback from websocket back to client. 2018-10-17 21:38:19 +02:00
Erik Little 75057023cb clean up emit completion code 2018-10-17 09:55:11 -04:00
Erik Little d839a35340 update cartfile too 2018-10-17 06:57:59 -04:00
Erik Little d5a478f64a update deps: Fix #1105 2018-10-17 06:56:30 -04:00
Erik Little e5f3fb13ae Merge pull request #1097 from cobrowseio/writecompletion
Add optional write completion handler for emit's
2018-10-04 06:56:18 -04:00
Erik Little 0d8890defd update xcode settings 2018-10-04 06:55:05 -04:00
Erik Little 016e12720d Merge branch 'development'
* development:
  update changelog and bump pod version
  check for 200 status code when polling #857
  update xcode versino
  set the right URL in websocket creation
  fix cookies import when create the websocket
  Be sure to keep secure config even if config is changed. Fix #1078
  Don't need to write DispatchTime
  use while let instead of while and if let
2018-10-04 05:56:16 -04:00
Erik Little d25a926226 update changelog and bump pod version 2018-10-04 05:55:44 -04:00
Andy 09fc43349f convert SocketData to serialisable socket representation 2018-10-02 21:08:55 +07:00
Andy b3e305fd14 Add a variadic method for emit completion handlers in swift 2018-10-02 20:55:38 +07:00
Andy d763fad449 no need to capture completion hander in wrapper 2018-10-02 19:05:22 +07:00
Erik Little e877bb26c3 check for 200 status code when polling #857 2018-10-02 07:53:36 -04:00
Andy 28fad62ccd wrap completion handler to run on handleQueue 2018-10-02 13:47:03 +07:00
Andy f9d8595a25 add optional write completion handler for emit's 2018-09-29 16:29:58 +07:00
Erik Little 3bf28cd427 Merge pull request #1080 from flashbreak/master
fix cookies import when create the websocket
2018-09-27 08:33:13 -04:00
Erik Little c3032579c0 update xcode versino 2018-09-18 11:00:18 -04:00
Hugo Schouman 867db19bc5 set the right URL in websocket creation 2018-09-05 19:26:35 +02:00
Hugo Schouman cfa6a217be fix cookies import when create the websocket 2018-09-03 15:51:20 +02:00
Erik Little 520ff72395 Be sure to keep secure config even if config is changed. Fix #1078 2018-08-30 09:14:34 -04:00
Erik Little 25df8b66fc Don't need to write DispatchTime 2018-08-29 10:25:09 -04:00
Erik Little d632135289 use while let instead of while and if let 2018-08-28 10:46:52 -04:00
Peter Dupris b48f1e9af5 expose Starscream WebSocket enableSOCKSProxy option to socket.io-client-swift options 2018-06-27 19:35:52 -07:00
75 changed files with 1433 additions and 515 deletions

No files matched your search

-1
View File
@@ -1 +0,0 @@
4.0
+1 -1
View File
@@ -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.2
osx_image: xcode11.2
branches:
only:
- master
+28 -1
View File
@@ -1,3 +1,31 @@
# 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))
@@ -60,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
View File
@@ -1 +1 @@
github "daltoniam/Starscream" ~> 3.0
github "daltoniam/Starscream" ~> 3.1
+1 -1
View File
@@ -1 +1 @@
github "daltoniam/Starscream" "3.0.5"
github "daltoniam/Starscream" "3.1.0"
+2 -20
View File
@@ -1,31 +1,13 @@
{
"object": {
"pins": [
{
"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": "114e5df9b6251970a069e8f1c0cbb5802759f0a9",
"version": "3.0.5"
}
},
{
"package": "SSCZLib",
"repositoryURL": "https://github.com/daltoniam/zlib-spm.git",
"state": {
"branch": null,
"revision": "83ac8d719a2f3aa775dbdf116a57f56fb2c49abb",
"version": "1.1.0"
"revision": "9c03ef715d1bc9334b446c90df53586dd38cf849",
"version": "3.1.0"
}
}
]
+2 -2
View File
@@ -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"]),
+6 -6
View File
@@ -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.3.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.3.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.3.0'
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
end
```
+6 -4
View File
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.module_name = "SocketIO"
s.version = "13.3.0"
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.3.0',
: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
@@ -9,6 +9,7 @@
/* 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 */; };
@@ -64,6 +65,7 @@
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>"; };
@@ -159,6 +161,7 @@
1C686BD71F869AF1007D8627 /* SocketParserTest.swift */,
1C686BD81F869AF1007D8627 /* SocketNamespacePacketTest.swift */,
DD52BBAC5FAA7730D32CD5BF /* SocketMangerTest.swift */,
1C6577B639C34EE1C8829D9A /* utils.swift */,
);
name = TestSocketIO;
path = Tests/TestSocketIO;
@@ -391,7 +394,7 @@
attributes = {
LastSwiftMigration = 0730;
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1020;
TargetAttributes = {
572EF2371B51F18A00EEBB58 = {
CreatedOnToolsVersion = 6.4;
@@ -408,6 +411,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 572EF20D1B51F12F00EEBB58;
@@ -501,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;
};
@@ -519,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;
@@ -581,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;
@@ -592,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;
@@ -651,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;
@@ -719,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)";
@@ -782,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)";
@@ -867,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)";
};
@@ -941,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"
@@ -115,6 +115,7 @@ public final class OnAckCallback : NSObject {
self.binary = binary
}
/// :nodoc:
deinit {
DefaultSocketLogger.Logger.log("OnAckCallback for \(ackNumber) being released", type: "OnAckCallback")
}
+4 -3
View File
@@ -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
}
+32 -6
View File
@@ -83,7 +83,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
@objc
public private(set) var status = SocketIOStatus.notConnected {
didSet {
handleClientEvent(.statusChange, data: [status])
handleClientEvent(.statusChange, data: [status, status.rawValue])
}
}
@@ -107,6 +107,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
super.init()
}
/// :nodoc:
deinit {
DefaultSocketLogger.Logger.log("Client is being released", type: logType)
}
@@ -204,16 +205,17 @@ 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() }))
try emit(event, with: items.map({ try $0.socketRepresentation() }), completion: completion)
} catch {
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
type: logType)
@@ -231,6 +233,16 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
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.
@@ -284,8 +296,22 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
return createOnAck([event] + items)
}
func emit(_ data: [Any], ack: Int? = nil, binary: Bool = true, isAck: Bool = false) {
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
}
@@ -295,7 +321,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec {
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`.
@@ -52,6 +52,9 @@ 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.
@@ -75,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)
@@ -125,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:
@@ -133,6 +146,8 @@ public enum SocketIOClientOption : ClientOption {
description = "security"
case .sessionDelegate:
description = "sessionDelegate"
case .enableSOCKSProxy:
description = "enableSOCKSProxy"
}
return description
@@ -170,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):
@@ -178,6 +197,8 @@ public enum SocketIOClientOption : ClientOption {
value = signed
case let .sessionDelegate(delegate):
value = delegate
case let .enableSOCKSProxy(enable):
value = enable
}
return value
@@ -92,14 +92,15 @@ public protocol SocketIOClientSpec : AnyObject {
/// 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`.
///
@@ -236,7 +237,7 @@ public protocol SocketIOClientSpec : AnyObject {
public extension SocketIOClientSpec {
/// Default implementation.
public func didError(reason: String) {
func didError(reason: String) {
DefaultSocketLogger.Logger.error("\(reason)", type: "SocketIOClient")
handleClientEvent(.error, data: [reason])
@@ -326,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
@@ -334,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
}
+39 -20
View File
@@ -49,7 +49,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
/// 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.
@@ -114,6 +114,9 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
@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?
@@ -167,6 +170,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])
}
/// :nodoc:
deinit {
DefaultSocketLogger.Logger.log("Engine is being released", type: SocketEngine.logType)
closed = true
@@ -223,7 +227,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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)
@@ -281,9 +285,11 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
private func createWebSocketAndConnect() {
var req = URLRequest(url: urlWebSocketWithSid)
addHeaders(to: &req, includingCookies: session?.configuration.httpCookieStorage?.cookies)
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
@@ -313,6 +319,12 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
this.parseEngineMessage(message)
}
ws?.onHttpResponseHeaders = {[weak self] headers in
guard let this = self else { return }
this.client?.engineDidWebsocketUpgrade(headers: headers)
}
ws?.connect()
}
@@ -340,7 +352,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
if polling {
disconnectPolling(reason: reason)
} else {
sendWebSocketMessage("", withType: .close, withData: [])
sendWebSocketMessage("", withType: .close, withData: [], completion: nil)
closeOutEngine(reason: reason)
}
}
@@ -348,7 +360,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
// 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)
@@ -366,7 +378,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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
@@ -384,7 +396,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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)
@@ -398,7 +410,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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)
@@ -538,15 +550,14 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
// 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 }
@@ -588,6 +599,8 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
self.security = security
case .compress:
self.compress = true
case .enableSOCKSProxy:
self.enableSOCKSProxy = true
default:
continue
}
@@ -600,7 +613,7 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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
}
}
@@ -610,11 +623,15 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
/// - parameter msg: The message to send.
/// - parameter type: The type of this message.
/// - parameter data: Any data that this message has.
open 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
}
@@ -622,11 +639,11 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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)
}
}
}
@@ -662,7 +679,9 @@ open class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, So
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 {
@@ -158,11 +159,11 @@ extension SocketEngineSpec {
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 {
for (headerName, value) in extraHeaders {
req.setValue(value, forHTTPHeaderField: headerName)
@@ -174,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)
}
}
}
+46 -8
View File
@@ -97,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 {
@@ -137,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)
@@ -156,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)
@@ -290,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)
}
}
@@ -381,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.
@@ -466,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.
@@ -485,16 +514,25 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
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.
@@ -69,8 +69,14 @@ public protocol SocketManagerSpec : AnyObject, 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 }
+1 -1
View File
@@ -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
+6 -9
View File
@@ -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")
+7 -1
View File
@@ -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
}
+6 -4
View File
@@ -51,17 +51,19 @@ public protocol SocketLogger : AnyObject {
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)!
+4 -1
View File
@@ -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> {
+3 -3
View File
@@ -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() {
+32 -1
View File
@@ -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()
@@ -80,6 +107,8 @@ class SocketMangerTest : XCTestCase {
.forceNew(true),
.reconnects(false),
.reconnectWait(5),
.reconnectWaitMax(5),
.randomizationFactor(0.7),
.reconnectAttempts(5)
])
@@ -87,6 +116,8 @@ class SocketMangerTest : XCTestCase {
XCTAssertTrue(manager.forceNew)
XCTAssertFalse(manager.reconnects)
XCTAssertEqual(manager.reconnectWait, 5)
XCTAssertEqual(manager.reconnectWaitMax, 5)
XCTAssertEqual(manager.randomizationFactor, 0.7)
XCTAssertEqual(manager.reconnectAttempts, 5)
}
@@ -188,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
@@ -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: (() -> ())?) { }
}
+13
View File
@@ -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)
}
}
@@ -34,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;
@@ -67,6 +68,20 @@
[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]];
}
@@ -84,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"];
+5 -2
View File
@@ -173,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>
@@ -280,8 +283,8 @@ and a <code>connect</code> event fired.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -522,8 +525,8 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -279,8 +282,8 @@ Example:</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+9 -6
View File
@@ -174,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>
@@ -295,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">
@@ -358,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">
@@ -425,8 +428,8 @@ validation</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+10 -7
View File
@@ -174,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>
@@ -286,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">
@@ -355,9 +358,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A10AckEmitterC4withyAA0A4Data_pd_tF"></a>
<a name="/s:8SocketIO0A10AckEmitterC4withyyAA0A4Data_pd_tF"></a>
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A10AckEmitterC4withyAA0A4Data_pd_tF">with(_:)</a>
<a class="token" href="#/s:8SocketIO0A10AckEmitterC4withyyAA0A4Data_pd_tF">with(_:)</a>
</code>
</div>
<div class="height-container">
@@ -367,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>
@@ -456,8 +459,8 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -296,8 +299,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+112 -34
View File
@@ -174,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>
@@ -290,9 +293,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A6EngineC8postWaitSaySSGvp"></a>
<a name="/s:8SocketIO0A6EngineC8postWaitSaySS3msg_yycSg10completiontGvp"></a>
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A6EngineC8postWaitSaySSGvp">postWait</a>
<a class="token" href="#/s:8SocketIO0A6EngineC8postWaitSaySS3msg_yycSg10completiontGvp">postWait</a>
</code>
</div>
<div class="height-container">
@@ -309,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="p">:</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>
@@ -396,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="p">:</span> <span class="kt">Bool</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>
@@ -423,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="p">:</span> <span class="kt">Bool</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>
@@ -450,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="p">:</span> <span class="kt">Bool</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>
@@ -477,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>
@@ -506,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="p">:</span> <span class="kt">Bool</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>
@@ -533,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="p">:</span> <span class="kt">Bool</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>
@@ -560,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="p">:</span> <span class="kt">Bool</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>
@@ -587,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="p">:</span> <span class="kt">Bool</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>
@@ -614,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="p">:</span> <span class="kt">Bool</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>
@@ -641,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="p">:</span> <span class="kt">Bool</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>
@@ -651,9 +674,9 @@ disconnect us.</p>
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgvp"></a>
<a name="/s:8SocketIO0A6EngineC7sessionSo12NSURLSessionCSgvp"></a>
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgvp">session</a>
<a class="token" href="#/s:8SocketIO0A6EngineC7sessionSo12NSURLSessionCSgvp">session</a>
</code>
</div>
<div class="height-container">
@@ -668,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>
@@ -695,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="p">:</span> <span class="kt">String</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>
@@ -722,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="p">:</span> <span class="kt">String</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>
@@ -749,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="p">:</span> <span class="kt">URL</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>
@@ -776,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="p">:</span> <span class="kt">URL</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>
@@ -804,7 +837,38 @@ disconnect us.</p>
<div class="language">
<p class="aside-title">Swift</p>
<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="kt">Bool</span></code></pre>
<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>
@@ -831,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>
@@ -879,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">
@@ -1282,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">
@@ -1311,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">
@@ -1328,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">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></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">-&gt;</span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
@@ -1372,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>
@@ -1392,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">
@@ -1424,8 +1502,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+122 -41
View File
@@ -174,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>
@@ -294,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">-&gt;</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">-&gt;</span> <span class="p">())?</span> <span class="p">{</span>
<span class="k">get</span>
<span class="p">}</span></code></pre>
</div>
</div>
@@ -321,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="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="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>
@@ -349,7 +356,9 @@
<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="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>
<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>
@@ -418,17 +427,6 @@
</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>
@@ -594,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">
@@ -641,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">
@@ -718,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_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A8IOClientC4emitySS_AA0A4Data_pdtF">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">
@@ -728,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>
@@ -738,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">-&gt;</span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
@@ -770,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>
@@ -838,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_AA0A4Data_pdtF"></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">-&gt;</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_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
<a class="token" href="#/s:8SocketIO0A8IOClientC11emitWithAckyAA02OnF8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
</code>
</div>
<div class="height-container">
@@ -853,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&rsquo;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>
@@ -984,9 +1065,9 @@ Check that your server&rsquo;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">
@@ -1103,9 +1184,9 @@ Check that your server&rsquo;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">
@@ -1244,9 +1325,9 @@ Check that your server&rsquo;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">
@@ -1347,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">
@@ -1557,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">
@@ -1626,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">
@@ -1883,8 +1964,8 @@ Called when the manager detects a broken connection, or when a manual reconnect
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+117 -14
View File
@@ -174,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>
@@ -460,7 +463,7 @@ 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">
@@ -474,6 +477,60 @@ called on.</p>
</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>
</section>
</div>
</li>
<li class="item">
<div>
<code>
@@ -547,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">
@@ -922,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">
@@ -968,9 +1025,9 @@ releasing.</p>
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A7ManagerC7emitAllySS_AA0A4Data_pdtF"></a>
<a name="/s:8SocketIO0A7ManagerC7emitAllyySS_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emitAll(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAllySS_AA0A4Data_pdtF">emitAll(_:_:)</a>
<a class="token" href="#/s:8SocketIO0A7ManagerC7emitAllyySS_AA0A4Data_pdtF">emitAll(_:_:)</a>
</code>
</div>
<div class="height-container">
@@ -1038,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_AA0A4Data_pdtF">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">
@@ -1275,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>
@@ -1382,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">
@@ -1454,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">
@@ -1544,8 +1647,8 @@ Or call <code><a href="../Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)Soc
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+8 -5
View File
@@ -174,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>
@@ -205,9 +208,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A10RawAckViewC4withyAA0A4Data_pd_tF"></a>
<a name="/s:8SocketIO0A10RawAckViewC4withyyAA0A4Data_pd_tF"></a>
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A10RawAckViewC4withyAA0A4Data_pd_tF">with(_:)</a>
<a class="token" href="#/s:8SocketIO0A10RawAckViewC4withyyAA0A4Data_pd_tF">with(_:)</a>
</code>
</div>
<div class="height-container">
@@ -217,7 +220,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>
@@ -306,8 +309,8 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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 -8
View File
@@ -174,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>
@@ -205,9 +208,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A7RawViewC4emitySS_AA0A4Data_pdtF"></a>
<a name="/s:8SocketIO0A7RawViewC4emityySS_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A7RawViewC4emitySS_AA0A4Data_pdtF">emit(_:_:)</a>
<a class="token" href="#/s:8SocketIO0A7RawViewC4emityySS_AA0A4Data_pdtF">emit(_:_:)</a>
</code>
</div>
<div class="height-container">
@@ -217,7 +220,7 @@
<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: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>
@@ -325,9 +328,9 @@ will be emitted. The structure of the error data is <code>[eventName, items, the
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A7RawViewC11emitWithAckAA02OnG8CallbackCSS_AA0A4Data_pdtF"></a>
<a name="/s:8SocketIO0A7RawViewC11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emitWithAck(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A7RawViewC11emitWithAckAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
<a class="token" href="#/s:8SocketIO0A7RawViewC11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
</code>
</div>
<div class="height-container">
@@ -340,7 +343,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&rsquo;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>
@@ -476,8 +479,8 @@ Check that your server&rsquo;s api will ack the event being sent.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -390,8 +393,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+7 -4
View File
@@ -174,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>
@@ -208,9 +211,9 @@
<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">
@@ -240,8 +243,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+58 -18
View File
@@ -174,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>
@@ -208,9 +211,9 @@
<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">
@@ -241,9 +244,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -274,9 +277,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -307,9 +310,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -340,9 +343,9 @@ data item: the namespace that was connected to.</p>
<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,9 +376,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -406,9 +409,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -439,9 +442,9 @@ data item: the namespace that was connected to.</p>
<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">
@@ -451,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&rsquo;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>
@@ -469,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>
@@ -477,8 +517,8 @@ data item: the namespace that was connected to.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -396,8 +399,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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 -58
View File
@@ -174,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,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">
@@ -228,9 +231,9 @@
<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">
@@ -255,9 +258,9 @@
<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">
@@ -282,9 +285,9 @@
<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">
@@ -309,9 +312,9 @@
<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">
@@ -337,9 +340,9 @@ or when you want to be sure no state from previous engines is being carried over
<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">
@@ -364,9 +367,9 @@ or when you want to be sure no state from previous engines is being carried over
<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">
@@ -391,9 +394,36 @@ or when you want to be sure no state from previous engines is being carried over
<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">
@@ -421,9 +451,9 @@ called on.</p>
<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">
@@ -448,9 +478,9 @@ called on.</p>
<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">
@@ -475,9 +505,9 @@ called on.</p>
<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">
@@ -502,9 +532,9 @@ called on.</p>
<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">
@@ -530,9 +560,9 @@ over when reconnects happen.</p>
<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">
@@ -557,9 +587,9 @@ over when reconnects happen.</p>
<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">
@@ -567,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">
@@ -584,9 +614,63 @@ over when reconnects happen.</p>
<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">
@@ -611,9 +695,9 @@ over when reconnects happen.</p>
<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">
@@ -638,9 +722,9 @@ over when reconnects happen.</p>
<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">
@@ -665,9 +749,9 @@ over when reconnects happen.</p>
<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">
@@ -741,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">
@@ -808,8 +892,8 @@ over when reconnects happen.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -389,8 +392,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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 -8
View File
@@ -174,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>
@@ -208,9 +211,9 @@
<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">
@@ -235,9 +238,9 @@
<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">
@@ -262,9 +265,9 @@
<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">
@@ -294,8 +297,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -196,8 +199,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -576,8 +579,8 @@ or call one of the <code>disconnectSocket</code> methods on this class.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+7 -4
View File
@@ -174,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>
@@ -208,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">
@@ -259,8 +262,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -261,8 +264,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -245,8 +248,8 @@ So this should ideally be an array of one packet waiting for data.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+51 -2
View File
@@ -174,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>
@@ -490,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>
@@ -498,8 +547,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+14 -11
View File
@@ -174,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>
@@ -235,9 +238,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A14EnginePollableP8postWaitSaySSGvp"></a>
<a name="/s:8SocketIO0A14EnginePollableP8postWaitSaySS3msg_yycSg10completiontGvp"></a>
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A14EnginePollableP8postWaitSaySSGvp">postWait</a>
<a class="token" href="#/s:8SocketIO0A14EnginePollableP8postWaitSaySS3msg_yycSg10completiontGvp">postWait</a>
</code>
</div>
<div class="height-container">
@@ -254,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> <span class="p">{</span> <span class="k">get</span> <span class="k">set</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>
@@ -264,9 +267,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgvp"></a>
<a name="/s:8SocketIO0A14EnginePollableP7sessionSo12NSURLSessionCSgvp"></a>
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgvp">session</a>
<a class="token" href="#/s:8SocketIO0A14EnginePollableP7sessionSo12NSURLSessionCSgvp">session</a>
</code>
</div>
<div class="height-container">
@@ -401,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
@@ -430,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">-&gt;</span> <span class="p">())?)</span></code></pre>
</div>
</div>
@@ -523,8 +526,8 @@ disconnect us.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+21 -6
View File
@@ -174,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>
@@ -1067,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">
@@ -1084,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">-&gt;</span> <span class="p">())?)</span></code></pre>
</div>
</div>
@@ -1128,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>
@@ -1142,8 +1157,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+21 -6
View File
@@ -174,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>
@@ -208,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
@@ -237,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">-&gt;</span> <span class="p">())?)</span></code></pre>
</div>
</div>
@@ -281,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>
@@ -295,8 +310,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+66 -51
View File
@@ -174,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>
@@ -399,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&rsquo;re doing.</p>
@@ -418,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">
@@ -479,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">
@@ -526,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">
@@ -572,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
@@ -653,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_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emit(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP4emitySS_AA0A4Data_pdtF">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">
@@ -663,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>
@@ -673,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">-&gt;</span> <span class="p">())?)</span></code></pre>
</div>
</div>
@@ -705,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>
@@ -714,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">
@@ -772,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_AA0A4Data_pdtF"></a>
<a name="/s:8SocketIO0A12IOClientSpecP11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF"></a>
<a name="//apple_ref/swift/Method/emitWithAck(_:_:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11emitWithAckAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP11emitWithAckyAA02OnG8CallbackCSS_AA0A4Data_pdtF">emitWithAck(_:_:)</a>
</code>
</div>
<div class="height-container">
@@ -787,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&rsquo;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>
@@ -846,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">
@@ -904,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">
@@ -962,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">
@@ -1044,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">
@@ -1145,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">
@@ -1157,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">
@@ -1193,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">
@@ -1205,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">
@@ -1241,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">
@@ -1253,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">
@@ -1289,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">
@@ -1351,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">
@@ -1419,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">
@@ -1481,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">
@@ -1543,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">
@@ -1618,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">
@@ -1653,8 +1668,8 @@ Called when the manager detects a broken connection, or when a manual reconnect
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+9 -6
View File
@@ -174,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>
@@ -246,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
@@ -324,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
@@ -407,8 +410,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+60 -3
View File
@@ -174,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>
@@ -398,7 +401,7 @@ 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">
@@ -412,6 +415,60 @@ called on.</p>
</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>
</section>
</div>
</li>
<li class="item">
<div>
<code>
@@ -918,8 +975,8 @@ Or call <code><a href="../Classes/SocketIOClient.html#/c:@M@SocketIO@objc(cs)Soc
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+9 -6
View File
@@ -174,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>
@@ -208,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
@@ -270,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
@@ -333,8 +336,8 @@ into the correct placeholder.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -174,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>
@@ -292,8 +295,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+9 -6
View File
@@ -174,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>
@@ -262,9 +265,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcvp"></a>
<a name="/s:8SocketIO0A12EventHandlerV8callbackyySayypG_AA0A10AckEmitterCtcvp"></a>
<a name="//apple_ref/swift/Property/callback" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcvp">callback</a>
<a class="token" href="#/s:8SocketIO0A12EventHandlerV8callbackyySayypG_AA0A10AckEmitterCtcvp">callback</a>
</code>
</div>
<div class="height-container">
@@ -300,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">
@@ -375,8 +378,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+15 -12
View File
@@ -174,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>
@@ -462,9 +465,9 @@
<li class="item">
<div>
<code>
<a name="/s:s10CollectionP7ElementQz5IndexQzcip"></a>
<a name="/s:Sly7ElementQz5IndexQzcip"></a>
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:s10CollectionP7ElementQz5IndexQzcip">subscript(_:)</a>
<a class="token" href="#/s:Sly7ElementQz5IndexQzcip">subscript(_:)</a>
</code>
</div>
<div class="height-container">
@@ -488,9 +491,9 @@
<li class="item">
<div>
<code>
<a name="/s:s10CollectionP11SubSequenceQzs5RangeVy5IndexQzGcip"></a>
<a name="/s:Sly11SubSequenceQzSny5IndexQzGcip"></a>
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:s10CollectionP11SubSequenceQzs5RangeVy5IndexQzGcip">subscript(_:)</a>
<a class="token" href="#/s:Sly11SubSequenceQzSny5IndexQzGcip">subscript(_:)</a>
</code>
</div>
<div class="height-container">
@@ -525,9 +528,9 @@
<li class="item">
<div>
<code>
<a name="/s:8SocketIO0A21IOClientConfigurationVAcA0aC6OptionO12arrayLiterald_tcfc"></a>
<a name="/s:8SocketIO0A21IOClientConfigurationV12arrayLiteralAcA0aC6OptionOd_tcfc"></a>
<a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationVAcA0aC6OptionO12arrayLiterald_tcfc">init(arrayLiteral:)</a>
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV12arrayLiteralAcA0aC6OptionOd_tcfc">init(arrayLiteral:)</a>
</code>
</div>
<div class="height-container">
@@ -613,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">
@@ -643,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">
@@ -706,8 +709,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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 -5
View File
@@ -174,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>
@@ -306,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>
@@ -336,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>
@@ -483,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>
@@ -498,8 +505,8 @@ event type packets.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+20 -17
View File
@@ -174,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>
@@ -185,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>
@@ -208,9 +211,9 @@
<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">
@@ -235,9 +238,9 @@
<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">
@@ -262,9 +265,9 @@
<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">
@@ -289,9 +292,9 @@
<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">
@@ -316,9 +319,9 @@
<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,9 +346,9 @@
<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">
@@ -370,9 +373,9 @@
<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">
@@ -440,8 +443,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+32 -2
View File
@@ -174,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>
@@ -246,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">-&gt;</span> <span class="p">())?)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
@@ -254,8 +284,8 @@
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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>
+5 -2
View File
@@ -173,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>
@@ -229,8 +232,8 @@ will be released, along with the socket, and its memory reclaimed.</p>
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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 -8
View File
@@ -173,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>
@@ -245,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>
@@ -256,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>
@@ -266,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.3.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>
@@ -278,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" ~&gt; 13.3.0
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift" ~&gt; 15.1.0
</code></pre>
<p>Run <code>carthage update --platform ios,macosx</code>.</p>
@@ -290,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">'~&gt; 13.3.0'</span>
<span class="n">pod</span> <span class="s1">'Socket.IO-Client-Swift'</span><span class="p">,</span> <span class="s1">'~&gt; 15.1.0'</span>
<span class="k">end</span>
</code></pre>
@@ -331,8 +334,8 @@ SocketIOClient* socket = manager.defaultSocket;
</article>
</div>
<section class="footer">
<p>&copy; 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-07-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 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
View File
@@ -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/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 &gt; 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":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5firstALine 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 &gt; 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