Compare commits
158
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6905113b49 | ||
|
|
45af5d96d9 | ||
|
|
ff0f1c8c77 | ||
|
|
099c379272 | ||
|
|
f6d62301e7 | ||
|
|
c6bdf43d8d | ||
|
|
45955aec4a | ||
|
|
2865c72748 | ||
|
|
d4624e08bf | ||
|
|
102251b0bb | ||
|
|
40c98d5027 | ||
|
|
c8a127a8ed | ||
|
|
5c0bbde77b | ||
|
|
cd2454373a | ||
|
|
84218d55c3 | ||
|
|
665cfef8d3 | ||
|
|
43907a4001 | ||
|
|
66d052cee2 | ||
|
|
a2b1a999e5 | ||
|
|
5e69272ebc | ||
|
|
185d9708cd | ||
|
|
6138c535c9 | ||
|
|
392e479c59 | ||
|
|
15198fd9c2 | ||
|
|
3ee3f4f297 | ||
|
|
fb02d154e1 | ||
|
|
883b0f3ba4 | ||
|
|
6bff01a3b5 | ||
|
|
42d96d96fd | ||
|
|
819735efbf | ||
|
|
28cc8eef19 | ||
|
|
321bb186df | ||
|
|
91eea96308 | ||
|
|
486a89d407 | ||
|
|
5607280836 | ||
|
|
d878f56839 | ||
|
|
ca4261d8ca | ||
|
|
6eafce0082 | ||
|
|
752407fb67 | ||
|
|
4d30b3c951 | ||
|
|
1421da2aab | ||
|
|
4dcfcc2a84 | ||
|
|
8f50c5a3de | ||
|
|
8364815deb | ||
|
|
fc2852d1c1 | ||
|
|
9be3184f2a | ||
|
|
62d59d7762 | ||
|
|
bf2beb7431 | ||
|
|
ce8f1523cf | ||
|
|
32e0fe312b | ||
|
|
ad2fb175b3 | ||
|
|
04ba1aa1c5 | ||
|
|
dc4c25bff5 | ||
|
|
dc3b1ea8c7 | ||
|
|
2ac2f928c4 | ||
|
|
358e44a436 | ||
|
|
2f92a69bb0 | ||
|
|
6ca72c5751 | ||
|
|
4b48bdd3e5 | ||
|
|
cd3eb37ac8 | ||
|
|
e9296fd65a | ||
|
|
dda4a31149 | ||
|
|
02d82adf07 | ||
|
|
654d71abed | ||
|
|
5bcb075aa5 | ||
|
|
21ea0aff42 | ||
|
|
f6fa5b79ea | ||
|
|
d8104f4bf8 | ||
|
|
0516d3555a | ||
|
|
df8f87cc21 | ||
|
|
3019fd7ea3 | ||
|
|
5470fb6926 | ||
|
|
3eb7edc37c | ||
|
|
eef5fd987d | ||
|
|
757bfdc867 | ||
|
|
4237ed0d92 | ||
|
|
4929c8488c | ||
|
|
04e90fc905 | ||
|
|
64b56c593e | ||
|
|
ef84747de2 | ||
|
|
56fe22cc58 | ||
|
|
038e1b0881 | ||
|
|
ef278b0645 | ||
|
|
3c507d135f | ||
|
|
86155d5714 | ||
|
|
a1399d8c5c | ||
|
|
323327b0f2 | ||
|
|
710dd3cd7f | ||
|
|
4f83c466f0 | ||
|
|
955382eb8f | ||
|
|
4968e752e6 | ||
|
|
c8ff5bac96 | ||
|
|
afbf2cfc40 | ||
|
|
079c8e4e4c | ||
|
|
8c5f53d868 | ||
|
|
e6a2605c53 | ||
|
|
c1d8158ba5 | ||
|
|
6c510ebdb5 | ||
|
|
db81499eb8 | ||
|
|
b5d459be0d | ||
|
|
60b7beefa5 | ||
|
|
0d14294d79 | ||
|
|
818f82aaa5 | ||
|
|
54c2b3bd35 | ||
|
|
8be2df0f4b | ||
|
|
f34750a5ff | ||
|
|
5621f0dbe1 | ||
|
|
18efea4bad | ||
|
|
7a16d157f7 | ||
|
|
6d7ca472a3 | ||
|
|
0e5ffce862 | ||
|
|
ec5a8536be | ||
|
|
1ed131d925 | ||
|
|
74c45d5881 | ||
|
|
619db00c54 | ||
|
|
6d21dfdade | ||
|
|
38a1187cb7 | ||
|
|
2b6b001c0c | ||
|
|
f799cb3a34 | ||
|
|
00ea70e3bc | ||
|
|
684b9473d7 | ||
|
|
319fca0227 | ||
|
|
245c5a1392 | ||
|
|
92792ba71e | ||
|
|
817f36e80b | ||
|
|
3ba3354e9a | ||
|
|
98ac2a8035 | ||
|
|
72cd9d663e | ||
|
|
9c4a3ba8c4 | ||
|
|
b3ea49f7fd | ||
|
|
967c5e49c2 | ||
|
|
781a9e32ca | ||
|
|
f00af67283 | ||
|
|
b62f69a0ca | ||
|
|
407b5c644f | ||
|
|
89b866a611 | ||
|
|
0013e7fdb6 | ||
|
|
49961eb6cf | ||
|
|
54c54a23b7 | ||
|
|
beaa4b695c | ||
|
|
141b0ce6bc | ||
|
|
206e1eed4f | ||
|
|
1a42580826 | ||
|
|
6b4dfd578f | ||
|
|
630ef27436 | ||
|
|
6a8a5dc24a | ||
|
|
8f22bdef46 | ||
|
|
a2ea2df83a | ||
|
|
d37c7123d9 | ||
|
|
7ff10d141f | ||
|
|
839987727e | ||
|
|
c6dd1fb19b | ||
|
|
d1cbbc0213 | ||
|
|
d09c2f046b | ||
|
|
38dea9bb3e | ||
|
|
b86e78797e | ||
|
|
777f6e2406 | ||
|
|
33d7230a5f |
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
3.1
|
||||
4.0
|
||||
+9
-6
@@ -1,15 +1,18 @@
|
||||
language: objective-c
|
||||
xcode_project: Socket.IO-Client-Swift.xcodeproj # path to your xcodeproj folder
|
||||
xcode_scheme: SocketIO-iOS
|
||||
osx_image: xcode8.3
|
||||
xcode_scheme: SocketIO-Mac
|
||||
osx_image: xcode9
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- development
|
||||
before_install:
|
||||
- brew update
|
||||
- brew outdated xctool || brew upgrade xctool
|
||||
# - brew outdated xctool || brew upgrade xctool
|
||||
- brew outdated carthage || brew upgrade carthage
|
||||
- carthage update --platform macosx
|
||||
script:
|
||||
- xcodebuild -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build-for-testing -quiet
|
||||
- xctool -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac run-tests --parallelize
|
||||
#script: xcodebuild -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build test
|
||||
- xcodebuild -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build test -quiet
|
||||
# - xcodebuild -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build-for-testing -quiet
|
||||
# - xctool -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac run-tests --parallelize
|
||||
- swift test
|
||||
@@ -0,0 +1 @@
|
||||
github "daltoniam/Starscream" "2.1.1"
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "SSCZLib",
|
||||
"repositoryURL": "https://github.com/daltoniam/zlib-spm.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "83ac8d719a2f3aa775dbdf116a57f56fb2c49abb",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "SSCommonCrypto",
|
||||
"repositoryURL": "https://github.com/daltoniam/common-crypto-spm",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "2eb3aff0fb57f92f5722fac5d6d20bf64669ca66",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"package": "Starscream",
|
||||
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "21678c9426dde2a77152a0d5982cdb952baf0455",
|
||||
"version": "2.1.1"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+13
-1
@@ -1,5 +1,17 @@
|
||||
// swift-tools-version:4.0
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SocketIO"
|
||||
name: "SocketIO",
|
||||
products: [
|
||||
.library(name: "SocketIO", targets: ["SocketIO"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/daltoniam/Starscream", .upToNextMajor(from: "2.1.1")),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "SocketIO", dependencies: ["Starscream"]),
|
||||
.testTarget(name: "TestSocketIO", dependencies: ["SocketIO"]),
|
||||
]
|
||||
)
|
||||
@@ -7,7 +7,7 @@ Socket.IO-client for iOS/OS X.
|
||||
```swift
|
||||
import SocketIO
|
||||
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .forcePolling(true)])
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .compress])
|
||||
|
||||
socket.on(clientEvent: .connect) {data, ack in
|
||||
print("socket connected")
|
||||
@@ -30,7 +30,7 @@ socket.connect()
|
||||
```objective-c
|
||||
@import SocketIO;
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
|
||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
|
||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"compress": @YES}];
|
||||
|
||||
[socket on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
NSLog(@"socket connected");
|
||||
@@ -40,7 +40,7 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
double cur = [[data objectAtIndex:0] floatValue];
|
||||
|
||||
[[socket emitWithAck:@"canUpdate" with:@[@(cur)]] timingOutAfter:0 callback:^(NSArray* data) {
|
||||
[socket emit:@"update" withItems:@[@{@"amount": @(cur + 2.50)}]];
|
||||
[socket emit:@"update" with:@[@{@"amount": @(cur + 2.50)}]];
|
||||
}];
|
||||
|
||||
[ack with:@[@"Got your currentAmount, ", @"dude"]];
|
||||
@@ -57,32 +57,33 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
- Supports TLS/SSL
|
||||
- Can be used from Objective-C
|
||||
|
||||
## FAQS
|
||||
Checkout the [FAQs](https://nuclearace.github.io/Socket.IO-Client-Swift/faq.html) for commonly asked questions.
|
||||
|
||||
## Installation
|
||||
Requires Swift 3/Xcode 8.x
|
||||
Requires Swift 4/Xcode 9.x
|
||||
|
||||
If you need swift 2.3 use the swift2.3 tag (Pre-Swift 3 support is no longer maintained)
|
||||
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)
|
||||
|
||||
If you need swift 2.2 use 7.x (Pre-Swift 3 support is no longer maintained)
|
||||
|
||||
If you need Swift 2.1 use v5.5.0 (Pre-Swift 2.2 support is no longer maintained)
|
||||
|
||||
If you need Swift 1.2 use v2.4.5 (Pre-Swift 2 support is no longer maintained)
|
||||
|
||||
If you need Swift 1.1 use v1.5.2. (Pre-Swift 1.2 support is no longer maintained)
|
||||
|
||||
### Manually (iOS 7+)
|
||||
1. Copy the Source folder into your Xcode project. (Make sure you add the files to your target(s))
|
||||
2. If you plan on using this from Objective-C, read [this](https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html) on exposing Swift code to Objective-C.
|
||||
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
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "YourSocketIOProject",
|
||||
name: "socket.io-test",
|
||||
products: [
|
||||
.executable(name: "socket.io-test", targets: ["YourTargetName"])
|
||||
],
|
||||
dependencies: [
|
||||
.Package(url: "https://github.com/socketio/socket.io-client-swift", majorVersion: 9)
|
||||
.package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMajor(from: "12.1.0"))
|
||||
],
|
||||
targets: [
|
||||
.target(name: "YourTargetName", dependencies: ["SocketIO"], path: "./Path/To/Your/Sources")
|
||||
]
|
||||
)
|
||||
```
|
||||
@@ -92,11 +93,13 @@ Then import `import SocketIO`.
|
||||
### Carthage
|
||||
Add this line to your `Cartfile`:
|
||||
```
|
||||
github "socketio/socket.io-client-swift" ~> 10.0.0 # Or latest version
|
||||
github "socketio/socket.io-client-swift" ~> 12.1.3 # Or latest version
|
||||
```
|
||||
|
||||
Run `carthage update --platform ios,macosx`.
|
||||
|
||||
Add the `Starscream` and `SocketIO` frameworks to your projects and follow the usual Carthage process.
|
||||
|
||||
### CocoaPods 1.0.0 or later
|
||||
Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
|
||||
|
||||
@@ -104,7 +107,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
|
||||
use_frameworks!
|
||||
|
||||
target 'YourApp' do
|
||||
pod 'Socket.IO-Client-Swift', '~> 10.0.0' # Or latest version
|
||||
pod 'Socket.IO-Client-Swift', '~> 12.1.3' # Or latest version
|
||||
end
|
||||
```
|
||||
|
||||
@@ -127,16 +130,6 @@ Objective-C:
|
||||
@import SocketIO;
|
||||
```
|
||||
|
||||
### CocoaSeeds
|
||||
|
||||
Add this line to your `Seedfile`:
|
||||
|
||||
```
|
||||
github "socketio/socket.io-client-swift", "v10.0.0", :files => "Source/*.swift" # Or latest version
|
||||
```
|
||||
|
||||
Run `seed install`.
|
||||
|
||||
|
||||
# [Docs](https://nuclearace.github.io/Socket.IO-Client-Swift/index.html)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "Socket.IO-Client-Swift"
|
||||
s.module_name = "SocketIO"
|
||||
s.version = "10.0.0"
|
||||
s.version = "12.1.3"
|
||||
s.summary = "Socket.IO-client for iOS and OS X"
|
||||
s.description = <<-DESC
|
||||
Socket.IO-client for iOS and OS X.
|
||||
@@ -14,9 +14,15 @@ Pod::Spec.new do |s|
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.osx.deployment_target = '10.10'
|
||||
s.tvos.deployment_target = '9.0'
|
||||
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v10.0.0' }
|
||||
s.source_files = "Source/**/*.swift"
|
||||
s.requires_arc = true
|
||||
s.pod_target_xcconfig = {'SWIFT_VERSION' => '3.1'}
|
||||
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
|
||||
s.source = {
|
||||
:git => "https://github.com/socketio/socket.io-client-swift.git",
|
||||
:tag => 'v12.1.3',
|
||||
:submodules => true
|
||||
}
|
||||
s.pod_target_xcconfig = {
|
||||
'SWIFT_VERSION' => '4.0'
|
||||
}
|
||||
s.source_files = "Source/SocketIO/**/*.swift", "Source/SocketIO/*.swift"
|
||||
s.dependency "Starscream", "~> 2.1.1"
|
||||
end
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,6 +40,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
@@ -69,6 +70,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,8 +40,8 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -70,6 +70,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0800"
|
||||
LastUpgradeVersion = "0900"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -40,6 +40,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
@@ -69,6 +70,7 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,259 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// SSLSecurity.swift
|
||||
// Starscream
|
||||
//
|
||||
// Created by Dalton Cherry on 5/16/15.
|
||||
// Copyright (c) 2014-2016 Dalton Cherry.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
import Foundation
|
||||
import Security
|
||||
|
||||
public protocol SSLTrustValidator {
|
||||
func isValid(_ trust: SecTrust, domain: String?) -> Bool
|
||||
}
|
||||
|
||||
open class SSLCert : NSObject {
|
||||
var certData: Data?
|
||||
var key: SecKey?
|
||||
|
||||
/**
|
||||
Designated init for certificates
|
||||
|
||||
- parameter data: is the binary data of the certificate
|
||||
|
||||
- returns: a representation security object to be used with
|
||||
*/
|
||||
public init(data: Data) {
|
||||
self.certData = data
|
||||
}
|
||||
|
||||
/**
|
||||
Designated init for public keys
|
||||
|
||||
- parameter key: is the public key to be used
|
||||
|
||||
- returns: a representation security object to be used with
|
||||
*/
|
||||
public init(key: SecKey) {
|
||||
self.key = key
|
||||
}
|
||||
}
|
||||
|
||||
open class SSLSecurity : SSLTrustValidator {
|
||||
public var validatedDN = true //should the domain name be validated?
|
||||
|
||||
var isReady = false //is the key processing done?
|
||||
var certificates: [Data]? //the certificates
|
||||
@nonobjc var pubKeys: [SecKey]? //the public keys
|
||||
var usePublicKeys = false //use public keys or certificate validation?
|
||||
|
||||
/**
|
||||
Use certs from main app bundle
|
||||
|
||||
- parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation
|
||||
|
||||
- returns: a representation security object to be used with
|
||||
*/
|
||||
public convenience init(usePublicKeys: Bool = false) {
|
||||
let paths = Bundle.main.paths(forResourcesOfType: "cer", inDirectory: ".")
|
||||
|
||||
let certs = paths.reduce([SSLCert]()) { (certs: [SSLCert], path: String) -> [SSLCert] in
|
||||
var certs = certs
|
||||
if let data = NSData(contentsOfFile: path) {
|
||||
certs.append(SSLCert(data: data as Data))
|
||||
}
|
||||
return certs
|
||||
}
|
||||
|
||||
self.init(certs: certs, usePublicKeys: usePublicKeys)
|
||||
}
|
||||
|
||||
/**
|
||||
Designated init
|
||||
|
||||
- parameter certs: is the certificates or public keys to use
|
||||
- parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation
|
||||
|
||||
- returns: a representation security object to be used with
|
||||
*/
|
||||
public init(certs: [SSLCert], usePublicKeys: Bool) {
|
||||
self.usePublicKeys = usePublicKeys
|
||||
|
||||
if self.usePublicKeys {
|
||||
DispatchQueue.global(qos: .default).async {
|
||||
let pubKeys = certs.reduce([SecKey]()) { (pubKeys: [SecKey], cert: SSLCert) -> [SecKey] in
|
||||
var pubKeys = pubKeys
|
||||
if let data = cert.certData, cert.key == nil {
|
||||
cert.key = self.extractPublicKey(data)
|
||||
}
|
||||
if let key = cert.key {
|
||||
pubKeys.append(key)
|
||||
}
|
||||
return pubKeys
|
||||
}
|
||||
|
||||
self.pubKeys = pubKeys
|
||||
self.isReady = true
|
||||
}
|
||||
} else {
|
||||
let certificates = certs.reduce([Data]()) { (certificates: [Data], cert: SSLCert) -> [Data] in
|
||||
var certificates = certificates
|
||||
if let data = cert.certData {
|
||||
certificates.append(data)
|
||||
}
|
||||
return certificates
|
||||
}
|
||||
self.certificates = certificates
|
||||
self.isReady = true
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Valid the trust and domain name.
|
||||
|
||||
- parameter trust: is the serverTrust to validate
|
||||
- parameter domain: is the CN domain to validate
|
||||
|
||||
- returns: if the key was successfully validated
|
||||
*/
|
||||
public func isValid(_ trust: SecTrust, domain: String?) -> Bool {
|
||||
|
||||
var tries = 0
|
||||
while !self.isReady {
|
||||
usleep(1000)
|
||||
tries += 1
|
||||
if tries > 5 {
|
||||
return false //doesn't appear it is going to ever be ready...
|
||||
}
|
||||
}
|
||||
var policy: SecPolicy
|
||||
if self.validatedDN {
|
||||
policy = SecPolicyCreateSSL(true, domain as NSString?)
|
||||
} else {
|
||||
policy = SecPolicyCreateBasicX509()
|
||||
}
|
||||
SecTrustSetPolicies(trust,policy)
|
||||
if self.usePublicKeys {
|
||||
if let keys = self.pubKeys {
|
||||
let serverPubKeys = publicKeyChain(trust)
|
||||
for serverKey in serverPubKeys as [AnyObject] {
|
||||
for key in keys as [AnyObject] {
|
||||
if serverKey.isEqual(key) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if let certs = self.certificates {
|
||||
let serverCerts = certificateChain(trust)
|
||||
var collect = [SecCertificate]()
|
||||
for cert in certs {
|
||||
collect.append(SecCertificateCreateWithData(nil,cert as CFData)!)
|
||||
}
|
||||
SecTrustSetAnchorCertificates(trust,collect as NSArray)
|
||||
var result: SecTrustResultType = .unspecified
|
||||
SecTrustEvaluate(trust,&result)
|
||||
if result == .unspecified || result == .proceed {
|
||||
var trustedCount = 0
|
||||
for serverCert in serverCerts {
|
||||
for cert in certs {
|
||||
if cert == serverCert {
|
||||
trustedCount += 1
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if trustedCount == serverCerts.count {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
Get the public key from a certificate data
|
||||
|
||||
- parameter data: is the certificate to pull the public key from
|
||||
|
||||
- returns: a public key
|
||||
*/
|
||||
func extractPublicKey(_ data: Data) -> SecKey? {
|
||||
guard let cert = SecCertificateCreateWithData(nil, data as CFData) else { return nil }
|
||||
|
||||
return extractPublicKey(cert, policy: SecPolicyCreateBasicX509())
|
||||
}
|
||||
|
||||
/**
|
||||
Get the public key from a certificate
|
||||
|
||||
- parameter data: is the certificate to pull the public key from
|
||||
|
||||
- returns: a public key
|
||||
*/
|
||||
func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey? {
|
||||
var possibleTrust: SecTrust?
|
||||
SecTrustCreateWithCertificates(cert, policy, &possibleTrust)
|
||||
|
||||
guard let trust = possibleTrust else { return nil }
|
||||
var result: SecTrustResultType = .unspecified
|
||||
SecTrustEvaluate(trust, &result)
|
||||
return SecTrustCopyPublicKey(trust)
|
||||
}
|
||||
|
||||
/**
|
||||
Get the certificate chain for the trust
|
||||
|
||||
- parameter trust: is the trust to lookup the certificate chain for
|
||||
|
||||
- returns: the certificate chain for the trust
|
||||
*/
|
||||
func certificateChain(_ trust: SecTrust) -> [Data] {
|
||||
let certificates = (0..<SecTrustGetCertificateCount(trust)).reduce([Data]()) { (certificates: [Data], index: Int) -> [Data] in
|
||||
var certificates = certificates
|
||||
let cert = SecTrustGetCertificateAtIndex(trust, index)
|
||||
certificates.append(SecCertificateCopyData(cert!) as Data)
|
||||
return certificates
|
||||
}
|
||||
|
||||
return certificates
|
||||
}
|
||||
|
||||
/**
|
||||
Get the public key chain for the trust
|
||||
|
||||
- parameter trust: is the trust to lookup the certificate chain and extract the public keys
|
||||
|
||||
- returns: the public keys from the certifcate chain for the trust
|
||||
*/
|
||||
@nonobjc func publicKeyChain(_ trust: SecTrust) -> [SecKey] {
|
||||
let policy = SecPolicyCreateBasicX509()
|
||||
let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKey]()) { (keys: [SecKey], index: Int) -> [SecKey] in
|
||||
var keys = keys
|
||||
let cert = SecTrustGetCertificateAtIndex(trust, index)
|
||||
if let key = extractPublicKey(cert!, policy: policy) {
|
||||
keys.append(key)
|
||||
}
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -39,7 +39,13 @@ public final class SocketAckEmitter : NSObject {
|
||||
return ackNum != -1
|
||||
}
|
||||
|
||||
init(socket: SocketIOClient, ackNum: Int) {
|
||||
// MARK: Initializers
|
||||
|
||||
/// Creates a new `SocketAckEmitter`.
|
||||
///
|
||||
/// - parameter socket: The socket for this emitter.
|
||||
/// - parameter ackNum: The ack number for this emitter.
|
||||
public init(socket: SocketIOClient, ackNum: Int) {
|
||||
self.socket = socket
|
||||
self.ackNum = ackNum
|
||||
}
|
||||
@@ -65,6 +71,7 @@ public final class SocketAckEmitter : NSObject {
|
||||
/// Call to ack receiving this event.
|
||||
///
|
||||
/// - parameter items: An array of items to send when acking. Use `[]` to send nothing.
|
||||
@objc
|
||||
public func with(_ items: [Any]) {
|
||||
guard ackNum != -1 else { return }
|
||||
|
||||
@@ -104,15 +111,16 @@ public final class OnAckCallback : NSObject {
|
||||
/// - parameter after: The number of seconds before this emit times out if an ack hasn't been received.
|
||||
/// - parameter callback: The callback called when an ack is received, or when a timeout happens.
|
||||
/// To check for timeout, use `SocketAckStatus`'s `noAck` case.
|
||||
public func timingOut(after seconds: Int, callback: @escaping AckCallback) {
|
||||
@objc
|
||||
public func timingOut(after seconds: Double, callback: @escaping AckCallback) {
|
||||
guard let socket = self.socket, ackNumber != -1 else { return }
|
||||
|
||||
socket.ackHandlers.addAck(ackNumber, callback: callback)
|
||||
socket._emit(items, ack: ackNumber)
|
||||
socket.emit(items, ack: ackNumber)
|
||||
|
||||
guard seconds != 0 else { return }
|
||||
|
||||
socket.handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(seconds)) {
|
||||
socket.handleQueue.asyncAfter(deadline: DispatchTime.now() + seconds) {
|
||||
socket.ackHandlers.timeoutAck(self.ackNumber, onQueue: socket.handleQueue)
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -29,9 +29,11 @@ public final class SocketAnyEvent : NSObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// The event name.
|
||||
@objc
|
||||
public let event: String
|
||||
|
||||
/// The data items for this event.
|
||||
@objc
|
||||
public let items: [Any]?
|
||||
|
||||
/// The description of this event.
|
||||
@@ -24,12 +24,27 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct SocketEventHandler {
|
||||
let event: String
|
||||
let id: UUID
|
||||
let callback: NormalCallback
|
||||
|
||||
func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient) {
|
||||
/// A wrapper around a handler.
|
||||
public struct SocketEventHandler {
|
||||
// MARK: Properties
|
||||
|
||||
/// The event for this handler.
|
||||
public let event: String
|
||||
|
||||
/// A unique identifier for this handler.
|
||||
public let id: UUID
|
||||
|
||||
/// The actual handler function.
|
||||
public let callback: NormalCallback
|
||||
|
||||
// MARK: Methods
|
||||
|
||||
/// Causes this handler to be executed.
|
||||
///
|
||||
/// - parameter with: The data that this handler should be called with.
|
||||
/// - parameter withAck: The ack number that this event expects. Pass -1 to say this event doesn't expect an ack.
|
||||
/// - parameter withSocket: The socket that is calling this event.
|
||||
public func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient) {
|
||||
callback(items, SocketAckEmitter(socket: socket, ackNum: ack))
|
||||
}
|
||||
}
|
||||
@@ -33,10 +33,90 @@ import Foundation
|
||||
open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, SocketParsable {
|
||||
// MARK: Properties
|
||||
|
||||
private static let logType = "SocketIOClient"
|
||||
|
||||
/// If `true` then every time `connect` is called, a new engine will be created.
|
||||
@objc
|
||||
public var forceNew = false
|
||||
|
||||
/// The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||
/// called on.
|
||||
@objc
|
||||
public var handleQueue = DispatchQueue.main
|
||||
|
||||
/// The namespace that this socket is currently connected to.
|
||||
///
|
||||
/// **Must** start with a `/`.
|
||||
@objc
|
||||
public var nsp = "/"
|
||||
|
||||
/// The configuration for this client.
|
||||
///
|
||||
/// **This cannot be set after calling one of the connect methods**.
|
||||
public var config: SocketIOClientConfiguration {
|
||||
get {
|
||||
return _config
|
||||
}
|
||||
|
||||
set {
|
||||
guard status == .notConnected else {
|
||||
DefaultSocketLogger.Logger.error("Tried setting config after calling connect",
|
||||
type: SocketIOClient.logType)
|
||||
return
|
||||
}
|
||||
|
||||
_config = newValue
|
||||
|
||||
if socketURL.absoluteString.hasPrefix("https://") {
|
||||
_config.insert(.secure(true))
|
||||
}
|
||||
|
||||
_config.insert(.path("/socket.io/"), replacing: false)
|
||||
setConfigs()
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true`, this client will try and reconnect on any disconnects.
|
||||
@objc
|
||||
public var reconnects = true
|
||||
|
||||
/// The number of seconds to wait before attempting to reconnect.
|
||||
@objc
|
||||
public var reconnectWait = 10
|
||||
|
||||
/// The session id of this client.
|
||||
@objc
|
||||
public var sid: String? {
|
||||
return engine?.sid
|
||||
}
|
||||
|
||||
/// The URL of the socket.io server.
|
||||
///
|
||||
/// If changed after calling `init`, `forceNew` must be set to `true`, or it will only connect to the url set in the
|
||||
/// init.
|
||||
@objc
|
||||
public var socketURL: URL
|
||||
|
||||
/// A list of packets that are waiting for binary data.
|
||||
///
|
||||
/// The way that socket.io works all data should be sent directly after each packet.
|
||||
/// So this should ideally be an array of one packet waiting for data.
|
||||
///
|
||||
/// **This should not be modified directly.**
|
||||
public var waitingPackets = [SocketPacket]()
|
||||
|
||||
/// A handler that will be called on any event.
|
||||
public private(set) var anyHandler: ((SocketAnyEvent) -> ())?
|
||||
|
||||
/// The engine for this client.
|
||||
public private(set) var engine: SocketEngineSpec?
|
||||
@objc
|
||||
public internal(set) var engine: SocketEngineSpec?
|
||||
|
||||
/// The array of handlers for this socket.
|
||||
public private(set) var handlers = [SocketEventHandler]()
|
||||
|
||||
/// The status of this client.
|
||||
@objc
|
||||
public private(set) var status = SocketIOClientStatus.notConnected {
|
||||
didSet {
|
||||
switch status {
|
||||
@@ -51,47 +131,13 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
}
|
||||
|
||||
/// If `true` then every time `connect` is called, a new engine will be created.
|
||||
public var forceNew = false
|
||||
|
||||
/// The queue that all interaction with the client should occur on. This is the queue that event handlers are
|
||||
/// called on.
|
||||
public var handleQueue = DispatchQueue.main
|
||||
|
||||
/// The namespace for this client.
|
||||
public var nsp = "/"
|
||||
|
||||
/// The configuration for this client.
|
||||
public var config: SocketIOClientConfiguration
|
||||
|
||||
/// 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.
|
||||
public var reconnectWait = 10
|
||||
|
||||
/// The session id of this client.
|
||||
public var sid: String? {
|
||||
return engine?.sid
|
||||
}
|
||||
|
||||
/// The URL of the socket.io server.
|
||||
///
|
||||
/// If changed after calling `init`, `forceNew` must be set to `true`, or it will only connect to the url set in the
|
||||
/// init.
|
||||
public var socketURL: URL
|
||||
|
||||
var ackHandlers = SocketAckManager()
|
||||
var waitingPackets = [SocketPacket]()
|
||||
|
||||
private(set) var currentAck = -1
|
||||
private(set) var reconnectAttempts = -1
|
||||
|
||||
private let logType = "SocketIOClient"
|
||||
|
||||
private var anyHandler: ((SocketAnyEvent) -> ())?
|
||||
private var _config: SocketIOClientConfiguration
|
||||
private var currentReconnectAttempt = 0
|
||||
private var handlers = [SocketEventHandler]()
|
||||
private var reconnecting = false
|
||||
|
||||
// MARK: Initializers
|
||||
@@ -101,39 +147,18 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// - parameter socketURL: The url of the socket.io server.
|
||||
/// - parameter config: The config for this socket.
|
||||
public init(socketURL: URL, config: SocketIOClientConfiguration = []) {
|
||||
self.config = config
|
||||
self._config = config
|
||||
self.socketURL = socketURL
|
||||
|
||||
if socketURL.absoluteString.hasPrefix("https://") {
|
||||
self.config.insert(.secure(true))
|
||||
self._config.insert(.secure(true))
|
||||
}
|
||||
|
||||
for option in config {
|
||||
switch option {
|
||||
case let .reconnects(reconnects):
|
||||
self.reconnects = reconnects
|
||||
case let .reconnectAttempts(attempts):
|
||||
reconnectAttempts = attempts
|
||||
case let .reconnectWait(wait):
|
||||
reconnectWait = abs(wait)
|
||||
case let .nsp(nsp):
|
||||
self.nsp = nsp
|
||||
case let .log(log):
|
||||
DefaultSocketLogger.Logger.log = log
|
||||
case let .logger(logger):
|
||||
DefaultSocketLogger.Logger = logger
|
||||
case let .handleQueue(queue):
|
||||
handleQueue = queue
|
||||
case let .forceNew(force):
|
||||
forceNew = force
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
self.config.insert(.path("/socket.io/"), replacing: false)
|
||||
self._config.insert(.path("/socket.io/"), replacing: false)
|
||||
|
||||
super.init()
|
||||
|
||||
setConfigs()
|
||||
}
|
||||
|
||||
/// Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.
|
||||
@@ -141,39 +166,50 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
///
|
||||
/// - parameter socketURL: The url of the socket.io server.
|
||||
/// - parameter config: The config for this socket.
|
||||
@objc
|
||||
public convenience init(socketURL: NSURL, config: NSDictionary?) {
|
||||
self.init(socketURL: socketURL as URL, config: config?.toSocketConfiguration() ?? [])
|
||||
}
|
||||
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("Client is being released", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Client is being released", type: SocketIOClient.logType)
|
||||
engine?.disconnect(reason: "Client Deinit")
|
||||
}
|
||||
|
||||
// MARK: Methods
|
||||
|
||||
private func addEngine() {
|
||||
DefaultSocketLogger.Logger.log("Adding engine", type: logType, args: "")
|
||||
DefaultSocketLogger.Logger.log("Adding engine", type: SocketIOClient.logType)
|
||||
|
||||
engine?.engineQueue.sync {
|
||||
self.engine?.client = nil
|
||||
}
|
||||
|
||||
engine?.client = nil
|
||||
engine = SocketEngine(client: self, url: socketURL, config: config)
|
||||
}
|
||||
|
||||
/// Connect to the server.
|
||||
/// Connect to the server. The same as calling `connect(timeoutAfter:withHandler:)` with a timeout of 0.
|
||||
///
|
||||
/// Only call after adding your event listeners, unless you know what you're doing.
|
||||
@objc
|
||||
open func connect() {
|
||||
connect(timeoutAfter: 0, withHandler: nil)
|
||||
}
|
||||
|
||||
/// Connect to the server. If we aren't connected after `timeoutAfter` seconds, then `withHandler` is called.
|
||||
///
|
||||
/// Only call after adding your event listeners, unless you know what you're doing.
|
||||
///
|
||||
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
|
||||
/// has failed. Pass 0 to never timeout.
|
||||
/// - parameter withHandler: The handler to call when the client fails to connect.
|
||||
open func connect(timeoutAfter: Int, withHandler handler: (() -> ())?) {
|
||||
@objc
|
||||
open func connect(timeoutAfter: Double, withHandler handler: (() -> ())?) {
|
||||
assert(timeoutAfter >= 0, "Invalid timeout: \(timeoutAfter)")
|
||||
|
||||
guard status != .connected else {
|
||||
DefaultSocketLogger.Logger.log("Tried connecting on an already connected socket", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Tried connecting on an already connected socket",
|
||||
type: SocketIOClient.logType)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -187,7 +223,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
|
||||
guard timeoutAfter != 0 else { return }
|
||||
|
||||
handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(timeoutAfter)) {[weak self] in
|
||||
handleQueue.asyncAfter(deadline: DispatchTime.now() + timeoutAfter) {[weak self] in
|
||||
guard let this = self, this.status == .connecting || this.status == .notConnected else { return }
|
||||
|
||||
this.status = .disconnected
|
||||
@@ -203,18 +239,27 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
return OnAckCallback(ackNumber: currentAck, items: items, socket: self)
|
||||
}
|
||||
|
||||
func didConnect() {
|
||||
DefaultSocketLogger.Logger.log("Socket connected", type: logType)
|
||||
/// Called when the client connects to a namespace. If the client was created with a namespace upfront,
|
||||
/// then this is only called when the client connects to that namespace.
|
||||
///
|
||||
/// - parameter toNamespace: The namespace that was connected to.
|
||||
open func didConnect(toNamespace namespace: String) {
|
||||
guard status != .connected else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Socket connected", type: SocketIOClient.logType)
|
||||
|
||||
status = .connected
|
||||
|
||||
handleClientEvent(.connect, data: [])
|
||||
handleClientEvent(.connect, data: [namespace])
|
||||
}
|
||||
|
||||
func didDisconnect(reason: String) {
|
||||
/// Called when the client has disconnected from socket.io.
|
||||
///
|
||||
/// - parameter reason: The reason for the disconnection.
|
||||
open func didDisconnect(reason: String) {
|
||||
guard status != .disconnected else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Disconnected: %@", type: logType, args: reason)
|
||||
DefaultSocketLogger.Logger.log("Disconnected: \(reason)", type: SocketIOClient.logType)
|
||||
|
||||
reconnecting = false
|
||||
status = .disconnected
|
||||
@@ -225,8 +270,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
|
||||
/// Disconnects the socket.
|
||||
@objc
|
||||
open func disconnect() {
|
||||
DefaultSocketLogger.Logger.log("Closing socket", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Closing socket", type: SocketIOClient.logType)
|
||||
|
||||
didDisconnect(reason: "Disconnect")
|
||||
}
|
||||
@@ -243,7 +289,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
try emit(event, with: items.map({ try $0.socketRepresentation() }))
|
||||
} catch let err {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: logType)
|
||||
type: SocketIOClient.logType)
|
||||
|
||||
handleClientEvent(.error, data: [event, items, err])
|
||||
}
|
||||
@@ -252,14 +298,15 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// Same as emit, but meant for Objective-C
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter with: The items to send with this event. May be left out.
|
||||
/// - parameter with: The items to send with this event. Send an empty array to send no data.
|
||||
@objc
|
||||
open func emit(_ event: String, with items: [Any]) {
|
||||
guard status == .connected else {
|
||||
handleClientEvent(.error, data: ["Tried emitting \(event) when not connected"])
|
||||
return
|
||||
}
|
||||
|
||||
_emit([event] + items)
|
||||
emit([event] + items)
|
||||
}
|
||||
|
||||
/// Sends a message to the server, requesting an ack.
|
||||
@@ -286,7 +333,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
return emitWithAck(event, with: try items.map({ try $0.socketRepresentation() }))
|
||||
} catch let err {
|
||||
DefaultSocketLogger.Logger.error("Error creating socketRepresentation for emit: \(event), \(items)",
|
||||
type: logType)
|
||||
type: SocketIOClient.logType)
|
||||
|
||||
handleClientEvent(.error, data: [event, items, err])
|
||||
|
||||
@@ -310,11 +357,12 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter with: The items to send with this event. Use `[]` to send nothing.
|
||||
/// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.
|
||||
@objc
|
||||
open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {
|
||||
return createOnAck([event] + items)
|
||||
}
|
||||
|
||||
func _emit(_ data: [Any], ack: Int? = nil) {
|
||||
func emit(_ data: [Any], ack: Int? = nil) {
|
||||
guard status == .connected else {
|
||||
handleClientEvent(.error, data: ["Tried emitting when not connected"])
|
||||
return
|
||||
@@ -323,19 +371,24 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
let packet = SocketPacket.packetFromEmit(data, id: ack ?? -1, nsp: nsp, ack: false)
|
||||
let str = packet.packetString
|
||||
|
||||
DefaultSocketLogger.Logger.log("Emitting: %@", type: logType, args: str)
|
||||
DefaultSocketLogger.Logger.log("Emitting: \(str)", type: SocketIOClient.logType)
|
||||
|
||||
engine?.send(str, withData: packet.binary)
|
||||
}
|
||||
|
||||
// If the server wants to know that the client received data
|
||||
func emitAck(_ ack: Int, with items: [Any]) {
|
||||
/// Call when you wish to tell the server that you've received the event for `ack`.
|
||||
///
|
||||
/// **You shouldn't need to call this directly.** Instead use an `SocketAckEmitter` that comes in an event callback.
|
||||
///
|
||||
/// - parameter ack: The ack number.
|
||||
/// - parameter with: The data for this ack.
|
||||
open func emitAck(_ ack: Int, with items: [Any]) {
|
||||
guard status == .connected else { return }
|
||||
|
||||
let packet = SocketPacket.packetFromEmit(items, id: ack, nsp: nsp, ack: true)
|
||||
let str = packet.packetString
|
||||
|
||||
DefaultSocketLogger.Logger.log("Emitting Ack: %@", type: logType, args: str)
|
||||
DefaultSocketLogger.Logger.log("Emitting Ack: \(str)", type: SocketIOClient.logType)
|
||||
|
||||
engine?.send(str, withData: packet.binary)
|
||||
}
|
||||
@@ -374,7 +427,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
|
||||
private func _engineDidError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
||||
DefaultSocketLogger.Logger.error("\(reason)", type: SocketIOClient.logType)
|
||||
|
||||
handleClientEvent(.error, data: [reason])
|
||||
}
|
||||
@@ -383,28 +436,47 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
///
|
||||
/// - parameter reason: The reason the engine opened.
|
||||
open func engineDidOpen(reason: String) {
|
||||
DefaultSocketLogger.Logger.log(reason, type: "SocketEngineClient")
|
||||
handleQueue.async {
|
||||
self._engineDidOpen(reason: reason)
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the socket gets an ack for something it sent
|
||||
func handleAck(_ ack: Int, data: [Any]) {
|
||||
private func _engineDidOpen(reason: String) {
|
||||
DefaultSocketLogger.Logger.log("Engine opened \(reason)", type: SocketIOClient.logType)
|
||||
|
||||
guard nsp != "/" else {
|
||||
didConnect(toNamespace: "/")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
joinNamespace(nsp)
|
||||
}
|
||||
|
||||
/// Called when socket.io has acked one of our emits. Causes the corresponding ack callback to be called.
|
||||
///
|
||||
/// - parameter ack: The number for this ack.
|
||||
/// - parameter data: The data sent back with this ack.
|
||||
@objc
|
||||
open func handleAck(_ ack: Int, data: [Any]) {
|
||||
guard status == .connected else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Handling ack: %@ with data: %@", type: logType, args: ack, data)
|
||||
DefaultSocketLogger.Logger.log("Handling ack: \(ack) with data: \(data)", type: SocketIOClient.logType)
|
||||
|
||||
ackHandlers.executeAck(ack, with: data, onQueue: handleQueue)
|
||||
}
|
||||
|
||||
/// Causes an event to be handled, and any event handlers for that event to be called.
|
||||
/// Called when we get an event from socket.io.
|
||||
///
|
||||
/// - parameter event: The event that is to be handled.
|
||||
/// - parameter data: the data associated with this event.
|
||||
/// - parameter isInternalMessage: If `true` event handlers for this event will be called regardless of status.
|
||||
/// - parameter withAck: The ack number for this event. May be left out.
|
||||
/// - parameter event: The name of the event.
|
||||
/// - parameter data: The data that was sent with this event.
|
||||
/// - parameter isInternalMessage: Whether this event was sent internally. If `true` it is always sent to handlers.
|
||||
/// - parameter withAck: If > 0 then this event expects to get an ack back from the client.
|
||||
@objc
|
||||
open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1) {
|
||||
guard status == .connected || isInternalMessage else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Handling event: %@ with data: %@", type: logType, args: event, data)
|
||||
DefaultSocketLogger.Logger.log("Handling event: \(event) with data: \(data)", type: SocketIOClient.logType)
|
||||
|
||||
anyHandler?(SocketAnyEvent(event: event, items: data))
|
||||
|
||||
@@ -413,16 +485,21 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
}
|
||||
|
||||
func handleClientEvent(_ event: SocketClientEvent, data: [Any]) {
|
||||
/// Called on socket.io specific events.
|
||||
///
|
||||
/// - parameter event: The `SocketClientEvent`.
|
||||
/// - parameter data: The data for this event.
|
||||
open func handleClientEvent(_ event: SocketClientEvent, data: [Any]) {
|
||||
handleEvent(event.rawValue, data: data, isInternalMessage: true)
|
||||
}
|
||||
|
||||
/// Leaves nsp and goes back to the default namespace.
|
||||
/// Call when you wish to leave a namespace and return to the default namespace.
|
||||
@objc
|
||||
open func leaveNamespace() {
|
||||
if nsp != "/" {
|
||||
engine?.send("1\(nsp)", withData: [])
|
||||
nsp = "/"
|
||||
}
|
||||
guard nsp != "/" else { return }
|
||||
|
||||
engine?.send("1\(nsp)", withData: [])
|
||||
nsp = "/"
|
||||
}
|
||||
|
||||
/// Joins `namespace`.
|
||||
@@ -430,13 +507,23 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// **Do not use this to join the default namespace.** Instead call `leaveNamespace`.
|
||||
///
|
||||
/// - parameter namespace: The namespace to join.
|
||||
@objc
|
||||
open func joinNamespace(_ namespace: String) {
|
||||
nsp = namespace
|
||||
guard namespace != "/" else { return }
|
||||
|
||||
if nsp != "/" {
|
||||
DefaultSocketLogger.Logger.log("Joining namespace", type: logType)
|
||||
engine?.send("0\(nsp)", withData: [])
|
||||
}
|
||||
DefaultSocketLogger.Logger.log("Joining namespace \(namespace)", type: SocketIOClient.logType)
|
||||
|
||||
nsp = namespace
|
||||
engine?.send("0\(nsp)", withData: [])
|
||||
}
|
||||
|
||||
/// Removes handler(s) for a client event.
|
||||
///
|
||||
/// If you wish to remove a client event handler, call the `off(id:)` with the UUID received from its `on` call.
|
||||
///
|
||||
/// - parameter clientEvent: The event to remove handlers for.
|
||||
open func off(clientEvent event: SocketClientEvent) {
|
||||
off(event.rawValue)
|
||||
}
|
||||
|
||||
/// Removes handler(s) based on an event name.
|
||||
@@ -444,8 +531,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// If you wish to remove a specific event, call the `off(id:)` with the UUID received from its `on` call.
|
||||
///
|
||||
/// - parameter event: The event to remove handlers for.
|
||||
@objc
|
||||
open func off(_ event: String) {
|
||||
DefaultSocketLogger.Logger.log("Removing handler for event: %@", type: logType, args: event)
|
||||
DefaultSocketLogger.Logger.log("Removing handler for event: \(event)", type: SocketIOClient.logType)
|
||||
|
||||
handlers = handlers.filter({ $0.event != event })
|
||||
}
|
||||
@@ -455,8 +543,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// If you want to remove all events for an event, call the off `off(_:)` method with the event name.
|
||||
///
|
||||
/// - parameter id: The UUID of the handler you wish to remove.
|
||||
@objc
|
||||
open func off(id: UUID) {
|
||||
DefaultSocketLogger.Logger.log("Removing handler with id: %@", type: logType, args: id)
|
||||
DefaultSocketLogger.Logger.log("Removing handler with id: \(id)", type: SocketIOClient.logType)
|
||||
|
||||
handlers = handlers.filter({ $0.id != id })
|
||||
}
|
||||
@@ -466,9 +555,10 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// - parameter event: The event name for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
@objc
|
||||
@discardableResult
|
||||
open func on(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
||||
DefaultSocketLogger.Logger.log("Adding handler for event: %@", type: logType, args: event)
|
||||
DefaultSocketLogger.Logger.log("Adding handler for event: \(event)", type: SocketIOClient.logType)
|
||||
|
||||
let handler = SocketEventHandler(event: event, id: UUID(), callback: callback)
|
||||
handlers.append(handler)
|
||||
@@ -491,7 +581,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
@discardableResult
|
||||
open func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID {
|
||||
DefaultSocketLogger.Logger.log("Adding handler for event: %@", type: logType, args: event)
|
||||
DefaultSocketLogger.Logger.log("Adding handler for event: \(event)", type: SocketIOClient.logType)
|
||||
|
||||
let handler = SocketEventHandler(event: event.rawValue, id: UUID(), callback: callback)
|
||||
handlers.append(handler)
|
||||
@@ -499,14 +589,25 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
return handler.id
|
||||
}
|
||||
|
||||
/// Adds a single-use handler for a client event.
|
||||
///
|
||||
/// - parameter clientEvent: The event for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
@discardableResult
|
||||
open func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID {
|
||||
return once(event.rawValue, callback: callback)
|
||||
}
|
||||
|
||||
/// Adds a single-use handler for an event.
|
||||
///
|
||||
/// - parameter event: The event name for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
@objc
|
||||
@discardableResult
|
||||
open func once(_ event: String, callback: @escaping NormalCallback) -> UUID {
|
||||
DefaultSocketLogger.Logger.log("Adding once handler for event: %@", type: logType, args: event)
|
||||
DefaultSocketLogger.Logger.log("Adding once handler for event: \(event)", type: SocketIOClient.logType)
|
||||
|
||||
let id = UUID()
|
||||
|
||||
@@ -524,6 +625,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// Adds a handler that will be called on every event.
|
||||
///
|
||||
/// - parameter handler: The callback that will execute whenever an event is received.
|
||||
@objc
|
||||
open func onAny(_ handler: @escaping (SocketAnyEvent) -> ()) {
|
||||
anyHandler = handler
|
||||
}
|
||||
@@ -532,7 +634,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
///
|
||||
/// - parameter msg: The message that needs parsing.
|
||||
public func parseEngineMessage(_ msg: String) {
|
||||
DefaultSocketLogger.Logger.log("Should parse message: %@", type: "SocketIOClient", args: msg)
|
||||
DefaultSocketLogger.Logger.log("Should parse message: \(msg)", type: SocketIOClient.logType)
|
||||
|
||||
handleQueue.async { self.parseSocketMessage(msg) }
|
||||
}
|
||||
@@ -547,6 +649,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
/// Tries to reconnect to the server.
|
||||
///
|
||||
/// This will cause a `disconnect` event to be emitted, as well as an `reconnectAttempt` event.
|
||||
@objc
|
||||
open func reconnect() {
|
||||
guard !reconnecting else { return }
|
||||
|
||||
@@ -554,7 +657,9 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
|
||||
/// Removes all handlers.
|
||||
///
|
||||
/// Can be used after disconnecting to break any potential remaining retain cycles.
|
||||
@objc
|
||||
open func removeAllHandlers() {
|
||||
handlers.removeAll(keepingCapacity: false)
|
||||
}
|
||||
@@ -562,7 +667,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
private func tryReconnect(reason: String) {
|
||||
guard reconnecting else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Starting reconnect", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Starting reconnect", type: SocketIOClient.logType)
|
||||
handleClientEvent(.reconnect, data: [reason])
|
||||
|
||||
_tryReconnect()
|
||||
@@ -575,7 +680,7 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
return didDisconnect(reason: "Reconnect Failed")
|
||||
}
|
||||
|
||||
DefaultSocketLogger.Logger.log("Trying to reconnect", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Trying to reconnect", type: SocketIOClient.logType)
|
||||
handleClientEvent(.reconnectAttempt, data: [(reconnectAttempts - currentReconnectAttempt)])
|
||||
|
||||
currentReconnectAttempt += 1
|
||||
@@ -584,6 +689,31 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(reconnectWait), execute: _tryReconnect)
|
||||
}
|
||||
|
||||
private func setConfigs() {
|
||||
for option in config {
|
||||
switch option {
|
||||
case let .reconnects(reconnects):
|
||||
self.reconnects = reconnects
|
||||
case let .reconnectAttempts(attempts):
|
||||
reconnectAttempts = attempts
|
||||
case let .reconnectWait(wait):
|
||||
reconnectWait = abs(wait)
|
||||
case let .nsp(nsp):
|
||||
self.nsp = nsp
|
||||
case let .log(log):
|
||||
DefaultSocketLogger.Logger.log = log
|
||||
case let .logger(logger):
|
||||
DefaultSocketLogger.Logger = logger
|
||||
case let .handleQueue(queue):
|
||||
handleQueue = queue
|
||||
case let .forceNew(force):
|
||||
forceNew = force
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test properties
|
||||
|
||||
var testHandlers: [SocketEventHandler] {
|
||||
@@ -603,6 +733,6 @@ open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, So
|
||||
}
|
||||
|
||||
func emitTest(event: String, _ data: Any...) {
|
||||
_emit([event] + data)
|
||||
emit([event] + data)
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -23,6 +23,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
protocol ClientOption : CustomStringConvertible, Equatable {
|
||||
func getSocketIOOptionValue() -> Any
|
||||
@@ -30,6 +31,9 @@ protocol ClientOption : CustomStringConvertible, Equatable {
|
||||
|
||||
/// The options for a client.
|
||||
public enum SocketIOClientOption : ClientOption {
|
||||
/// If given, the WebSocket transport will attempt to use compression.
|
||||
case compress
|
||||
|
||||
/// A dictionary of GET parameters that will be included in the connect url.
|
||||
case connectParams([String: Any])
|
||||
|
||||
@@ -94,6 +98,7 @@ public enum SocketIOClientOption : ClientOption {
|
||||
|
||||
/// If passed `true`, the WebSocket transport will try and use voip logic to keep network connections open in
|
||||
/// the background. **This option is experimental as socket.io shouldn't be used for background communication.**
|
||||
@available(*, deprecated, message: "No longer has any effect, and will be removed in v11.0")
|
||||
case voipEnabled(Bool)
|
||||
|
||||
// MARK: Properties
|
||||
@@ -103,6 +108,8 @@ public enum SocketIOClientOption : ClientOption {
|
||||
let description: String
|
||||
|
||||
switch self {
|
||||
case .compress:
|
||||
description = "compress"
|
||||
case .connectParams:
|
||||
description = "connectParams"
|
||||
case .cookies:
|
||||
@@ -152,6 +159,8 @@ public enum SocketIOClientOption : ClientOption {
|
||||
let value: Any
|
||||
|
||||
switch self {
|
||||
case .compress:
|
||||
value = true
|
||||
case let .connectParams(params):
|
||||
value = params
|
||||
case let .cookies(cookies):
|
||||
@@ -0,0 +1,262 @@
|
||||
//
|
||||
// SocketIOClientSpec.swift
|
||||
// Socket.IO-Client-Swift
|
||||
//
|
||||
// Created by Erik Little on 1/3/16.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Dispatch
|
||||
import Foundation
|
||||
|
||||
/// Defines the interface for a SocketIOClient.
|
||||
public protocol SocketIOClientSpec : class {
|
||||
// MARK: Properties
|
||||
|
||||
/// A handler that will be called on any event.
|
||||
var anyHandler: ((SocketAnyEvent) -> ())? { get }
|
||||
|
||||
/// The configuration for this client.
|
||||
var config: SocketIOClientConfiguration { get set }
|
||||
|
||||
/// The queue that all interaction with the client must be on.
|
||||
var handleQueue: DispatchQueue { get set }
|
||||
|
||||
/// The array of handlers for this socket.
|
||||
var handlers: [SocketEventHandler] { get }
|
||||
|
||||
/// The namespace that this socket is currently connected to.
|
||||
///
|
||||
/// **Must** start with a `/`.
|
||||
var nsp: String { get set }
|
||||
|
||||
/// The status of this client.
|
||||
var status: SocketIOClientStatus { get }
|
||||
|
||||
// MARK: Methods
|
||||
|
||||
/// Connect to the server. The same as calling `connect(timeoutAfter:withHandler:)` with a timeout of 0.
|
||||
///
|
||||
/// Only call after adding your event listeners, unless you know what you're doing.
|
||||
func connect()
|
||||
|
||||
/// Connect to the server. If we aren't connected after `timeoutAfter` seconds, then `withHandler` is called.
|
||||
///
|
||||
/// Only call after adding your event listeners, unless you know what you're doing.
|
||||
///
|
||||
/// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection
|
||||
/// has failed. Pass 0 to never timeout.
|
||||
/// - parameter withHandler: The handler to call when the client fails to connect.
|
||||
func connect(timeoutAfter: Double, withHandler handler: (() -> ())?)
|
||||
|
||||
/// Called when the client connects to a namespace. If the client was created with a namespace upfront,
|
||||
/// then this is only called when the client connects to that namespace.
|
||||
///
|
||||
/// - parameter toNamespace: The namespace that was connected to.
|
||||
func didConnect(toNamespace namespace: String)
|
||||
|
||||
/// Called when the client has disconnected from socket.io.
|
||||
///
|
||||
/// - parameter reason: The reason for the disconnection.
|
||||
func didDisconnect(reason: String)
|
||||
|
||||
/// Called when the client encounters an error.
|
||||
///
|
||||
/// - parameter reason: The reason for the disconnection.
|
||||
func didError(reason: String)
|
||||
|
||||
/// Disconnects the socket.
|
||||
func disconnect()
|
||||
|
||||
/// Send an event to the server, with optional data items.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. May be left out.
|
||||
func emit(_ event: String, _ items: SocketData...)
|
||||
|
||||
/// Call when you wish to tell the server that you've received the event for `ack`.
|
||||
///
|
||||
/// - parameter ack: The ack number.
|
||||
/// - parameter with: The data for this ack.
|
||||
func emitAck(_ ack: Int, with items: [Any])
|
||||
|
||||
/// Sends a message to the server, requesting an ack.
|
||||
///
|
||||
/// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.
|
||||
/// Check that your server's api will ack the event being sent.
|
||||
///
|
||||
/// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`
|
||||
/// will be emitted. The structure of the error data is `[eventName, items, theError]`
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.emitWithAck("myEvent", 1).timingOut(after: 1) {data in
|
||||
/// ...
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// - parameter event: The event to send.
|
||||
/// - parameter items: The items to send with this event. May be left out.
|
||||
/// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.
|
||||
func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
|
||||
|
||||
/// Called when socket.io has acked one of our emits. Causes the corresponding ack callback to be called.
|
||||
///
|
||||
/// - parameter ack: The number for this ack.
|
||||
/// - parameter data: The data sent back with this ack.
|
||||
func handleAck(_ ack: Int, data: [Any])
|
||||
|
||||
/// Called when we get an event from socket.io.
|
||||
///
|
||||
/// - parameter event: The name of the event.
|
||||
/// - parameter data: The data that was sent with this event.
|
||||
/// - parameter isInternalMessage: Whether this event was sent internally. If `true` it is always sent to handlers.
|
||||
/// - parameter withAck: If > 0 then this event expects to get an ack back from the client.
|
||||
func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)
|
||||
|
||||
/// Called on socket.io specific events.
|
||||
///
|
||||
/// - parameter event: The `SocketClientEvent`.
|
||||
/// - parameter data: The data for this event.
|
||||
func handleClientEvent(_ event: SocketClientEvent, data: [Any])
|
||||
|
||||
/// Call when you wish to leave a namespace and return to the default namespace.
|
||||
func leaveNamespace()
|
||||
|
||||
/// Joins `namespace`.
|
||||
///
|
||||
/// **Do not use this to join the default namespace.** Instead call `leaveNamespace`.
|
||||
///
|
||||
/// - parameter namespace: The namespace to join.
|
||||
func joinNamespace(_ namespace: String)
|
||||
|
||||
/// Removes handler(s) for a client event.
|
||||
///
|
||||
/// If you wish to remove a client event handler, call the `off(id:)` with the UUID received from its `on` call.
|
||||
///
|
||||
/// - parameter clientEvent: The event to remove handlers for.
|
||||
func off(clientEvent event: SocketClientEvent)
|
||||
|
||||
/// Removes handler(s) based on an event name.
|
||||
///
|
||||
/// If you wish to remove a specific event, call the `off(id:)` with the UUID received from its `on` call.
|
||||
///
|
||||
/// - parameter event: The event to remove handlers for.
|
||||
func off(_ event: String)
|
||||
|
||||
/// Removes a handler with the specified UUID gotten from an `on` or `once`
|
||||
///
|
||||
/// If you want to remove all events for an event, call the off `off(_:)` method with the event name.
|
||||
///
|
||||
/// - parameter id: The UUID of the handler you wish to remove.
|
||||
func off(id: UUID)
|
||||
|
||||
/// Adds a handler for an event.
|
||||
///
|
||||
/// - parameter event: The event name for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
func on(_ event: String, callback: @escaping NormalCallback) -> UUID
|
||||
|
||||
/// Adds a handler for a client event.
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.on(clientEvent: .connect) {data, ack in
|
||||
/// ...
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// - parameter event: The event for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
|
||||
|
||||
/// Adds a single-use handler for a client event.
|
||||
///
|
||||
/// - parameter clientEvent: The event for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
func once(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID
|
||||
|
||||
/// Adds a single-use handler for an event.
|
||||
///
|
||||
/// - parameter event: The event name for this handler.
|
||||
/// - parameter callback: The callback that will execute when this event is received.
|
||||
/// - returns: A unique id for the handler that can be used to remove it.
|
||||
func once(_ event: String, callback: @escaping NormalCallback) -> UUID
|
||||
|
||||
/// Adds a handler that will be called on every event.
|
||||
///
|
||||
/// - parameter handler: The callback that will execute whenever an event is received.
|
||||
func onAny(_ handler: @escaping (SocketAnyEvent) -> ())
|
||||
|
||||
/// Tries to reconnect to the server.
|
||||
func reconnect()
|
||||
|
||||
/// Removes all handlers.
|
||||
///
|
||||
/// Can be used after disconnecting to break any potential remaining retain cycles.
|
||||
func removeAllHandlers()
|
||||
}
|
||||
|
||||
public extension SocketIOClientSpec {
|
||||
/// Default implementation.
|
||||
public func didError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("\(reason)", type: "SocketIOClient")
|
||||
|
||||
handleClientEvent(.error, data: [reason])
|
||||
}
|
||||
}
|
||||
|
||||
/// The set of events that are generated by the client.
|
||||
public enum SocketClientEvent : String {
|
||||
// MARK: Cases
|
||||
|
||||
/// Emitted when the client connects. This is also called on a successful reconnection. A connect event gets one
|
||||
/// data item: the namespace that was connected to.
|
||||
///
|
||||
/// ```swift
|
||||
/// socket.on(clientEvent: .connect) {data, ack in
|
||||
/// guard let nsp = data[0] as? String else { return }
|
||||
/// // Some logic using the nsp
|
||||
/// }
|
||||
/// ```
|
||||
case connect
|
||||
|
||||
/// Called when the socket has disconnected and will not attempt to try to reconnect.
|
||||
case disconnect
|
||||
|
||||
/// Called when an error occurs.
|
||||
case error
|
||||
|
||||
/// Called when the client begins the reconnection process.
|
||||
case reconnect
|
||||
|
||||
/// Called each time the client tries to reconnect to the server.
|
||||
case reconnectAttempt
|
||||
|
||||
/// Called every time there is a change in the client's status.
|
||||
case statusChange
|
||||
}
|
||||
File renamed without changes.
@@ -24,12 +24,15 @@
|
||||
|
||||
import Dispatch
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
/// The class that handles the engine.io protocol and transports.
|
||||
/// See `SocketEnginePollable` and `SocketEngineWebsocket` for transport specific methods.
|
||||
public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket {
|
||||
// MARK: Properties
|
||||
|
||||
private static let logType = "SocketEngine"
|
||||
|
||||
/// The queue that all engine actions take place on.
|
||||
public let engineQueue = DispatchQueue(label: "com.socketio.engineHandleQueue")
|
||||
|
||||
@@ -60,6 +63,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// `true` if this engine is closed.
|
||||
public private(set) var closed = false
|
||||
|
||||
/// If `true` the engine will attempt to use WebSocket compression.
|
||||
public private(set) var compress = false
|
||||
|
||||
/// `true` if this engine is connected. Connected means that the initial poll connect has succeeded.
|
||||
public private(set) var connected = false
|
||||
|
||||
@@ -115,13 +121,12 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
private weak var sessionDelegate: URLSessionDelegate?
|
||||
|
||||
private let logType = "SocketEngine"
|
||||
private let url: URL
|
||||
|
||||
private var pingInterval: Double?
|
||||
private var pingTimeout = 0.0 {
|
||||
private var pingInterval: Int?
|
||||
private var pingTimeout = 0 {
|
||||
didSet {
|
||||
pongsMissedMax = Int(pingTimeout / (pingInterval ?? 25))
|
||||
pongsMissedMax = Int(pingTimeout / (pingInterval ?? 25000))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,9 +134,8 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
private var pongsMissedMax = 0
|
||||
private var probeWait = ProbeWaitQueue()
|
||||
private var secure = false
|
||||
private var security: SSLSecurity?
|
||||
private var security: SocketIO.SSLSecurity?
|
||||
private var selfSigned = false
|
||||
private var voipEnabled = false
|
||||
|
||||
// MARK: Initializers
|
||||
|
||||
@@ -163,14 +167,14 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
if !socketPath.hasSuffix("/") {
|
||||
socketPath += "/"
|
||||
}
|
||||
case let .voipEnabled(enable):
|
||||
voipEnabled = enable
|
||||
case let .secure(secure):
|
||||
self.secure = secure
|
||||
case let .selfSigned(selfSigned):
|
||||
self.selfSigned = selfSigned
|
||||
case let .security(security):
|
||||
self.security = security
|
||||
case .compress:
|
||||
self.compress = true
|
||||
default:
|
||||
continue
|
||||
}
|
||||
@@ -193,7 +197,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
|
||||
deinit {
|
||||
DefaultSocketLogger.Logger.log("Engine is being released", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Engine is being released", type: SocketEngine.logType)
|
||||
closed = true
|
||||
stopPolling()
|
||||
}
|
||||
@@ -202,7 +206,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
private func checkAndHandleEngineError(_ msg: String) {
|
||||
do {
|
||||
let dict = try msg.toNSDictionary()
|
||||
let dict = try msg.toDictionary()
|
||||
guard let error = dict["message"] as? String else { return }
|
||||
|
||||
/*
|
||||
@@ -219,7 +223,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
private func handleBase64(message: String) {
|
||||
// binary in base64 string
|
||||
let noPrefix = message[message.index(message.startIndex, offsetBy: 2)..<message.endIndex]
|
||||
let noPrefix = String(message[message.index(message.startIndex, offsetBy: 2)..<message.endIndex])
|
||||
|
||||
if let data = Data(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {
|
||||
client?.parseEngineBinaryData(data)
|
||||
@@ -246,35 +250,26 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
private func _connect() {
|
||||
if connected {
|
||||
DefaultSocketLogger.Logger.error("Engine tried opening while connected. Assuming this was a reconnect", type: logType)
|
||||
DefaultSocketLogger.Logger.error("Engine tried opening while connected. Assuming this was a reconnect",
|
||||
type: SocketEngine.logType)
|
||||
disconnect(reason: "reconnect")
|
||||
}
|
||||
|
||||
DefaultSocketLogger.Logger.log("Starting engine. Server: %@", type: logType, args: url)
|
||||
DefaultSocketLogger.Logger.log("Handshaking", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Starting engine. Server: \(url)", type: SocketEngine.logType)
|
||||
DefaultSocketLogger.Logger.log("Handshaking", type: SocketEngine.logType)
|
||||
|
||||
resetEngine()
|
||||
|
||||
if forceWebsockets {
|
||||
polling = false
|
||||
websocket = true
|
||||
createWebsocketAndConnect()
|
||||
createWebSocketAndConnect()
|
||||
return
|
||||
}
|
||||
|
||||
var reqPolling = URLRequest(url: urlPolling, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0)
|
||||
|
||||
if cookies != nil {
|
||||
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
||||
reqPolling.allHTTPHeaderFields = headers
|
||||
}
|
||||
|
||||
if let extraHeaders = extraHeaders {
|
||||
for (headerName, value) in extraHeaders {
|
||||
reqPolling.setValue(value, forHTTPHeaderField: headerName)
|
||||
}
|
||||
}
|
||||
|
||||
addHeaders(to: &reqPolling)
|
||||
doLongPoll(for: reqPolling)
|
||||
}
|
||||
|
||||
@@ -298,9 +293,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
urlWebSocket.scheme = "ws"
|
||||
}
|
||||
|
||||
if connectParams != nil {
|
||||
for (key, value) in connectParams! {
|
||||
let keyEsc = key.urlEncode()!
|
||||
if let connectParams = self.connectParams {
|
||||
for (key, value) in connectParams {
|
||||
let keyEsc = key.urlEncode()!
|
||||
let valueEsc = "\(value)".urlEncode()!
|
||||
|
||||
queryString += "&\(keyEsc)=\(valueEsc)"
|
||||
@@ -313,9 +308,9 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
return (urlPolling.url!, urlWebSocket.url!)
|
||||
}
|
||||
|
||||
private func createWebsocketAndConnect() {
|
||||
ws?.delegate = nil
|
||||
ws = WebSocket(url: urlWebSocketWithSid as URL)
|
||||
private func createWebSocketAndConnect() {
|
||||
ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
|
||||
ws = WebSocket(url: urlWebSocketWithSid)
|
||||
|
||||
if cookies != nil {
|
||||
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
||||
@@ -330,18 +325,19 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ws?.callbackQueue = engineQueue
|
||||
ws?.voipEnabled = voipEnabled
|
||||
ws?.enableCompression = compress
|
||||
ws?.delegate = self
|
||||
ws?.disableSSLCertValidation = selfSigned
|
||||
ws?.security = security
|
||||
ws?.security = security?.security
|
||||
|
||||
ws?.connect()
|
||||
}
|
||||
|
||||
/// Called when an error happens during execution. Causes a disconnection.
|
||||
public func didError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("%@", type: logType, args: reason)
|
||||
DefaultSocketLogger.Logger.error("\(reason)", type: SocketEngine.logType)
|
||||
client?.engineDidError(reason: reason)
|
||||
disconnect(reason: reason)
|
||||
}
|
||||
@@ -358,7 +354,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
private func _disconnect(reason: String) {
|
||||
guard connected else { return closeOutEngine(reason: reason) }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Engine is being closed.", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Engine is being closed.", type: SocketEngine.logType)
|
||||
|
||||
if closed {
|
||||
return closeOutEngine(reason: reason)
|
||||
@@ -388,7 +384,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
public func doFastUpgrade() {
|
||||
if waitingForPoll {
|
||||
DefaultSocketLogger.Logger.error("Outstanding poll when switched to WebSockets," +
|
||||
"we'll probably disconnect soon. You should report this.", type: logType)
|
||||
"we'll probably disconnect soon. You should report this.", type: SocketEngine.logType)
|
||||
}
|
||||
|
||||
sendWebSocketMessage("", withType: .upgrade, withData: [])
|
||||
@@ -400,7 +396,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
|
||||
private func flushProbeWait() {
|
||||
DefaultSocketLogger.Logger.log("Flushing probe wait", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Flushing probe wait", type: SocketEngine.logType)
|
||||
|
||||
for waiter in probeWait {
|
||||
write(waiter.msg, withType: waiter.type, withData: waiter.data)
|
||||
@@ -440,7 +436,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
|
||||
private func handleOpen(openData: String) {
|
||||
guard let json = try? openData.toNSDictionary() else {
|
||||
guard let json = try? openData.toDictionary() else {
|
||||
didError(reason: "Error parsing open packet")
|
||||
|
||||
return
|
||||
@@ -464,13 +460,13 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
upgradeWs = false
|
||||
}
|
||||
|
||||
if let pingInterval = json["pingInterval"] as? Double, let pingTimeout = json["pingTimeout"] as? Double {
|
||||
self.pingInterval = pingInterval / 1000.0
|
||||
self.pingTimeout = pingTimeout / 1000.0
|
||||
if let pingInterval = json["pingInterval"] as? Int, let pingTimeout = json["pingTimeout"] as? Int {
|
||||
self.pingInterval = pingInterval
|
||||
self.pingTimeout = pingTimeout
|
||||
}
|
||||
|
||||
if !forcePolling && !forceWebsockets && upgradeWs {
|
||||
createWebsocketAndConnect()
|
||||
createWebSocketAndConnect()
|
||||
}
|
||||
|
||||
sendPing()
|
||||
@@ -495,7 +491,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
///
|
||||
/// - parameter data: The data to parse.
|
||||
public func parseEngineData(_ data: Data) {
|
||||
DefaultSocketLogger.Logger.log("Got binary data: %@", type: "SocketEngine", args: data)
|
||||
DefaultSocketLogger.Logger.log("Got binary data: \(data)", type: SocketEngine.logType)
|
||||
|
||||
client?.parseEngineBinaryData(data.subdata(in: 1..<data.endIndex))
|
||||
}
|
||||
@@ -506,7 +502,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
/// - parameter fromPolling: Whether this message is from long-polling.
|
||||
/// If `true` we might have to fix utf8 encoding.
|
||||
public func parseEngineMessage(_ message: String) {
|
||||
DefaultSocketLogger.Logger.log("Got message: %@", type: logType, args: message)
|
||||
DefaultSocketLogger.Logger.log("Got message: \(message)", type: SocketEngine.logType)
|
||||
|
||||
let reader = SocketStringReader(message: message)
|
||||
|
||||
@@ -522,17 +518,17 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
|
||||
switch type {
|
||||
case .message:
|
||||
handleMessage(String(message.characters.dropFirst()))
|
||||
handleMessage(String(message.dropFirst()))
|
||||
case .noop:
|
||||
handleNOOP()
|
||||
case .pong:
|
||||
handlePong(with: message)
|
||||
case .open:
|
||||
handleOpen(openData: String(message.characters.dropFirst()))
|
||||
handleOpen(openData: String(message.dropFirst()))
|
||||
case .close:
|
||||
handleClose(message)
|
||||
default:
|
||||
DefaultSocketLogger.Logger.log("Got unknown packet type", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Got unknown packet type", type: SocketEngine.logType)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -555,7 +551,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
}
|
||||
|
||||
private func sendPing() {
|
||||
guard connected else { return }
|
||||
guard connected, let pingInterval = pingInterval else { return }
|
||||
|
||||
// Server is not responding
|
||||
if pongsMissed > pongsMissedMax {
|
||||
@@ -564,18 +560,21 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
return
|
||||
}
|
||||
|
||||
guard let pingInterval = pingInterval else { return }
|
||||
|
||||
pongsMissed += 1
|
||||
write("", withType: .ping, withData: [])
|
||||
|
||||
engineQueue.asyncAfter(deadline: DispatchTime.now() + Double(pingInterval)) {[weak self] in self?.sendPing() }
|
||||
engineQueue.asyncAfter(deadline: DispatchTime.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 }
|
||||
|
||||
this.sendPing()
|
||||
}
|
||||
}
|
||||
|
||||
// Moves from long-polling to websockets
|
||||
private func upgradeTransport() {
|
||||
if ws?.isConnected ?? false {
|
||||
DefaultSocketLogger.Logger.log("Upgrading transport to WebSockets", type: logType)
|
||||
DefaultSocketLogger.Logger.log("Upgrading transport to WebSockets", type: SocketEngine.logType)
|
||||
|
||||
fastUpgrade = true
|
||||
sendPollMessage("", withType: .noop, withData: [])
|
||||
@@ -593,12 +592,12 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
||||
guard self.connected else { return }
|
||||
|
||||
if self.websocket {
|
||||
DefaultSocketLogger.Logger.log("Writing ws: %@ has data: %@",
|
||||
type: self.logType, args: msg, data.count != 0)
|
||||
DefaultSocketLogger.Logger.log("Writing ws: \(msg) has data: \(data.count != 0)",
|
||||
type: SocketEngine.logType)
|
||||
self.sendWebSocketMessage(msg, withType: type, withData: data)
|
||||
} else if !self.probing {
|
||||
DefaultSocketLogger.Logger.log("Writing poll: %@ has data: %@",
|
||||
type: self.logType, args: msg, data.count != 0)
|
||||
DefaultSocketLogger.Logger.log("Writing poll: \(msg) has data: \(data.count != 0)",
|
||||
type: SocketEngine.logType)
|
||||
self.sendPollMessage(msg, withType: type, withData: data)
|
||||
} else {
|
||||
self.probeWait.append((msg, type, data))
|
||||
File renamed without changes.
File renamed without changes.
+5
-19
@@ -71,19 +71,6 @@ public protocol SocketEnginePollable : SocketEngineSpec {
|
||||
|
||||
// Default polling methods
|
||||
extension SocketEnginePollable {
|
||||
private func addHeaders(to req: inout URLRequest) {
|
||||
if cookies != nil {
|
||||
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
||||
req.allHTTPHeaderFields = headers
|
||||
}
|
||||
|
||||
if extraHeaders != nil {
|
||||
for (headerName, value) in extraHeaders! {
|
||||
req.setValue(value, forHTTPHeaderField: headerName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func createRequestForPostWithPostWait() -> URLRequest {
|
||||
defer { postWait.removeAll(keepingCapacity: true) }
|
||||
|
||||
@@ -93,7 +80,7 @@ extension SocketEnginePollable {
|
||||
postStr += "\(packet.utf16.count):\(packet)"
|
||||
}
|
||||
|
||||
DefaultSocketLogger.Logger.log("Created POST string: %@", type: "SocketEnginePolling", args: postStr)
|
||||
DefaultSocketLogger.Logger.log("Created POST string: \(postStr)", type: "SocketEnginePolling")
|
||||
|
||||
var req = URLRequest(url: urlPollingWithSid)
|
||||
let postData = postStr.data(using: .utf8, allowLossyConversion: false)!
|
||||
@@ -123,8 +110,7 @@ extension SocketEnginePollable {
|
||||
func doRequest(for req: URLRequest, callbackWith callback: @escaping (Data?, URLResponse?, Error?) -> ()) {
|
||||
guard polling && !closed && !invalidated && !fastUpgrade else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Doing polling %@ %@", type: "SocketEnginePolling",
|
||||
args: req.httpMethod ?? "", req)
|
||||
DefaultSocketLogger.Logger.log("Doing polling \(req.httpMethod ?? "") \(req)", type: "SocketEnginePolling")
|
||||
|
||||
session?.dataTask(with: req, completionHandler: callback).resume()
|
||||
}
|
||||
@@ -198,9 +184,9 @@ extension SocketEnginePollable {
|
||||
}
|
||||
|
||||
func parsePollingMessage(_ str: String) {
|
||||
guard str.characters.count != 1 else { return }
|
||||
guard str.count != 1 else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Got poll message: %@", type: "SocketEnginePolling", args: str)
|
||||
DefaultSocketLogger.Logger.log("Got poll message: \(str)", type: "SocketEnginePolling")
|
||||
|
||||
var reader = SocketStringReader(message: str)
|
||||
|
||||
@@ -222,7 +208,7 @@ extension SocketEnginePollable {
|
||||
/// - 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]) {
|
||||
DefaultSocketLogger.Logger.log("Sending poll: %@ as type: %@", type: "SocketEnginePolling", args: message, type.rawValue)
|
||||
DefaultSocketLogger.Logger.log("Sending poll: \(message) as type: \(type.rawValue)", type: "SocketEnginePolling")
|
||||
|
||||
postWait.append(String(type.rawValue) + message)
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
/// Specifies a SocketEngine.
|
||||
@objc public protocol SocketEngineSpec {
|
||||
/// The client for this engine.
|
||||
weak var client: SocketEngineClient? { get set }
|
||||
var client: SocketEngineClient? { get set }
|
||||
|
||||
/// `true` if this engine is closed.
|
||||
var closed: Bool { get }
|
||||
@@ -146,14 +147,21 @@ extension SocketEngineSpec {
|
||||
return com.url!
|
||||
}
|
||||
|
||||
func addHeaders(to req: inout URLRequest) {
|
||||
if let cookies = cookies {
|
||||
req.allHTTPHeaderFields = HTTPCookie.requestHeaderFields(with: cookies)
|
||||
}
|
||||
|
||||
if let extraHeaders = extraHeaders {
|
||||
for (headerName, value) in extraHeaders {
|
||||
req.setValue(value, forHTTPHeaderField: headerName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func createBinaryDataForSend(using data: Data) -> Either<Data, String> {
|
||||
if websocket {
|
||||
var byteArray = [UInt8](repeating: 0x4, count: 1)
|
||||
let mutData = NSMutableData(bytes: &byteArray, length: 1)
|
||||
|
||||
mutData.append(data)
|
||||
|
||||
return .left(mutData as Data)
|
||||
return .left(Data(bytes: [0x4]) + data)
|
||||
} else {
|
||||
return .right("b4" + data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0)))
|
||||
}
|
||||
+2
-1
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
/// Protocol that is used to implement socket.io WebSocket support
|
||||
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate {
|
||||
@@ -53,7 +54,7 @@ extension SocketEngineWebsocket {
|
||||
/// - 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]) {
|
||||
DefaultSocketLogger.Logger.log("Sending ws: %@ as type: %@", type: "SocketEngine", args: str, type.rawValue)
|
||||
DefaultSocketLogger.Logger.log("Sending ws: \(str) as type: \(type.rawValue)", type: "SocketEngineWebSocket")
|
||||
|
||||
ws?.write(string: "\(type.rawValue)\(str)")
|
||||
|
||||
@@ -25,42 +25,57 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct SocketPacket {
|
||||
enum PacketType: Int {
|
||||
case connect, disconnect, event, ack, error, binaryEvent, binaryAck
|
||||
}
|
||||
|
||||
private let placeholders: Int
|
||||
|
||||
/// A struct that represents a socket.io packet.
|
||||
public struct SocketPacket : CustomStringConvertible {
|
||||
// MARK: Properties
|
||||
|
||||
private static let logType = "SocketPacket"
|
||||
|
||||
let nsp: String
|
||||
let id: Int
|
||||
let type: PacketType
|
||||
|
||||
var binary: [Data]
|
||||
var data: [Any]
|
||||
var args: [Any] {
|
||||
/// The namespace for this packet.
|
||||
public let nsp: String
|
||||
|
||||
/// If > 0 then this packet is using acking.
|
||||
public let id: Int
|
||||
|
||||
/// The type of this packet.
|
||||
public let type: PacketType
|
||||
|
||||
/// An array of binary data for this packet.
|
||||
public internal(set) var binary: [Data]
|
||||
|
||||
/// The data for this event.
|
||||
///
|
||||
/// Note: This includes all data inside of the socket.io packet payload array, which includes the event name for
|
||||
/// event type packets.
|
||||
public internal(set) var data: [Any]
|
||||
|
||||
/// Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.
|
||||
public var args: [Any] {
|
||||
if type == .event || type == .binaryEvent && data.count != 0 {
|
||||
return Array(data.dropFirst())
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
var description: String {
|
||||
|
||||
private let placeholders: Int
|
||||
|
||||
/// A string representation of this packet.
|
||||
public var description: String {
|
||||
return "SocketPacket {type: \(String(type.rawValue)); data: " +
|
||||
"\(String(describing: data)); id: \(id); placeholders: \(placeholders); nsp: \(nsp)}"
|
||||
}
|
||||
|
||||
var event: String {
|
||||
|
||||
/// The event name for this packet.
|
||||
public var event: String {
|
||||
return String(describing: data[0])
|
||||
}
|
||||
|
||||
var packetString: String {
|
||||
|
||||
/// A string representation of this packet.
|
||||
public var packetString: String {
|
||||
return createPacketString()
|
||||
}
|
||||
|
||||
|
||||
init(type: PacketType, data: [Any] = [Any](), id: Int = -1, nsp: String, placeholders: Int = 0,
|
||||
binary: [Data] = [Data]()) {
|
||||
self.data = data
|
||||
@@ -70,14 +85,14 @@ struct SocketPacket {
|
||||
self.placeholders = placeholders
|
||||
self.binary = binary
|
||||
}
|
||||
|
||||
|
||||
mutating func addData(_ data: Data) -> Bool {
|
||||
if placeholders == binary.count {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
binary.append(data)
|
||||
|
||||
|
||||
if placeholders == binary.count {
|
||||
fillInPlaceholders()
|
||||
return true
|
||||
@@ -85,22 +100,19 @@ struct SocketPacket {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func completeMessage(_ message: String) -> String {
|
||||
if data.count == 0 {
|
||||
return message + "[]"
|
||||
}
|
||||
|
||||
guard data.count != 0 else { return message + "[]" }
|
||||
guard let jsonSend = try? data.toJSON(), let jsonString = String(data: jsonSend, encoding: .utf8) else {
|
||||
DefaultSocketLogger.Logger.error("Error creating JSON object in SocketPacket.completeMessage",
|
||||
type: SocketPacket.logType)
|
||||
|
||||
|
||||
return message + "[]"
|
||||
}
|
||||
|
||||
|
||||
return message + jsonString
|
||||
}
|
||||
|
||||
|
||||
private func createPacketString() -> String {
|
||||
let typeString = String(type.rawValue)
|
||||
// Binary count?
|
||||
@@ -109,17 +121,17 @@ struct SocketPacket {
|
||||
let nspString = binaryCountString + (nsp != "/" ? "\(nsp)," : "")
|
||||
// Ack number?
|
||||
let idString = nspString + (id != -1 ? String(id) : "")
|
||||
|
||||
|
||||
return completeMessage(idString)
|
||||
}
|
||||
|
||||
|
||||
// Called when we have all the binary data for a packet
|
||||
// calls _fillInPlaceholders, which replaces placeholders with the
|
||||
// corresponding binary
|
||||
private mutating func fillInPlaceholders() {
|
||||
data = data.map(_fillInPlaceholders)
|
||||
}
|
||||
|
||||
|
||||
// Helper method that looks for placeholders
|
||||
// If object is a collection it will recurse
|
||||
// Returns the object if it is not a placeholder or the corresponding
|
||||
@@ -132,9 +144,9 @@ struct SocketPacket {
|
||||
} else {
|
||||
return dict.reduce(JSON(), {cur, keyValue in
|
||||
var cur = cur
|
||||
|
||||
|
||||
cur[keyValue.0] = _fillInPlaceholders(keyValue.1)
|
||||
|
||||
|
||||
return cur
|
||||
})
|
||||
}
|
||||
@@ -146,6 +158,36 @@ struct SocketPacket {
|
||||
}
|
||||
}
|
||||
|
||||
public extension SocketPacket {
|
||||
// MARK: PacketType enum
|
||||
|
||||
/// The type of packets.
|
||||
public enum PacketType: Int {
|
||||
// MARK: Cases
|
||||
|
||||
/// Connect: 0
|
||||
case connect
|
||||
|
||||
/// Disconnect: 1
|
||||
case disconnect
|
||||
|
||||
/// Event: 2
|
||||
case event
|
||||
|
||||
/// Ack: 3
|
||||
case ack
|
||||
|
||||
/// Error: 4
|
||||
case error
|
||||
|
||||
/// Binary Event: 5
|
||||
case binaryEvent
|
||||
|
||||
/// Binary Ack: 6
|
||||
case binaryAck
|
||||
}
|
||||
}
|
||||
|
||||
extension SocketPacket {
|
||||
private static func findType(_ binCount: Int, ack: Bool) -> PacketType {
|
||||
switch binCount {
|
||||
@@ -161,13 +203,12 @@ extension SocketPacket {
|
||||
return .error
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool) -> SocketPacket {
|
||||
let (parsedData, binary) = deconstructData(items)
|
||||
let packet = SocketPacket(type: findType(binary.count, ack: ack), data: parsedData,
|
||||
id: id, nsp: nsp, binary: binary)
|
||||
|
||||
return packet
|
||||
|
||||
return SocketPacket(type: findType(binary.count, ack: ack), data: parsedData, id: id, nsp: nsp,
|
||||
binary: binary)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,32 +216,32 @@ private extension SocketPacket {
|
||||
// Recursive function that looks for NSData in collections
|
||||
static func shred(_ data: Any, binary: inout [Data]) -> Any {
|
||||
let placeholder = ["_placeholder": true, "num": binary.count] as JSON
|
||||
|
||||
|
||||
switch data {
|
||||
case let bin as Data:
|
||||
binary.append(bin)
|
||||
|
||||
|
||||
return placeholder
|
||||
case let arr as [Any]:
|
||||
return arr.map({shred($0, binary: &binary)})
|
||||
case let dict as JSON:
|
||||
return dict.reduce(JSON(), {cur, keyValue in
|
||||
var mutCur = cur
|
||||
|
||||
|
||||
mutCur[keyValue.0] = shred(keyValue.1, binary: &binary)
|
||||
|
||||
|
||||
return mutCur
|
||||
})
|
||||
default:
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Removes binary data from emit data
|
||||
// Returns a type containing the de-binaryed data and the binary
|
||||
static func deconstructData(_ data: [Any]) -> ([Any], [Data]) {
|
||||
var binary = [Data]()
|
||||
|
||||
return (data.map({shred($0, binary: &binary)}), binary)
|
||||
|
||||
return (data.map({ shred($0, binary: &binary) }), binary)
|
||||
}
|
||||
}
|
||||
@@ -22,24 +22,60 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol SocketParsable {
|
||||
/// Defines that a type will be able to parse socket.io-protocol messages.
|
||||
public protocol SocketParsable : class {
|
||||
// MARK: Properties
|
||||
|
||||
/// A list of packets that are waiting for binary data.
|
||||
///
|
||||
/// The way that socket.io works all data should be sent directly after each packet.
|
||||
/// So this should ideally be an array of one packet waiting for data.
|
||||
///
|
||||
/// **This should not be modified directly.**
|
||||
var waitingPackets: [SocketPacket] { get set }
|
||||
|
||||
// MARK: Methods
|
||||
|
||||
/// Called when the engine has received some binary data that should be attached to a packet.
|
||||
///
|
||||
/// Packets binary data should be sent directly after the packet that expects it, so there's confusion over
|
||||
/// where the data should go. Data should be received in the order it is sent, so that the correct data is put
|
||||
/// into the correct placeholder.
|
||||
///
|
||||
/// - parameter data: The data that should be attached to a packet.
|
||||
func parseBinaryData(_ data: Data)
|
||||
|
||||
/// Called when the engine has received a string that should be parsed into a socket.io packet.
|
||||
///
|
||||
/// - parameter message: The string that needs parsing.
|
||||
func parseSocketMessage(_ message: String)
|
||||
}
|
||||
|
||||
extension SocketParsable where Self: SocketIOClientSpec {
|
||||
/// Errors that can be thrown during parsing.
|
||||
public enum SocketParsableError : Error {
|
||||
// MARK: Cases
|
||||
|
||||
/// Thrown when a packet received has an invalid data array, or is missing the data array.
|
||||
case invalidDataArray
|
||||
|
||||
/// Thrown when an malformed packet is received.
|
||||
case invalidPacket
|
||||
|
||||
/// Thrown when the parser receives an unknown packet type.
|
||||
case invalidPacketType
|
||||
}
|
||||
|
||||
public extension SocketParsable where Self: SocketIOClientSpec {
|
||||
private func isCorrectNamespace(_ nsp: String) -> Bool {
|
||||
return nsp == self.nsp
|
||||
}
|
||||
|
||||
|
||||
private func handleConnect(_ packetNamespace: String) {
|
||||
if packetNamespace == "/" && nsp != "/" {
|
||||
joinNamespace(nsp)
|
||||
} else {
|
||||
didConnect()
|
||||
}
|
||||
guard packetNamespace == nsp else { return }
|
||||
|
||||
didConnect(toNamespace: packetNamespace)
|
||||
}
|
||||
|
||||
|
||||
private func handlePacket(_ pack: SocketPacket) {
|
||||
switch pack.type {
|
||||
case .event where isCorrectNamespace(pack.nsp):
|
||||
@@ -57,43 +93,46 @@ extension SocketParsable where Self: SocketIOClientSpec {
|
||||
case .error:
|
||||
handleEvent("error", data: pack.data, isInternalMessage: true, withAck: pack.id)
|
||||
default:
|
||||
DefaultSocketLogger.Logger.log("Got invalid packet: %@", type: "SocketParser", args: pack.description)
|
||||
DefaultSocketLogger.Logger.log("Got invalid packet: \(pack.description)", type: "SocketParser")
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses a messsage from the engine. Returning either a string error or a complete SocketPacket
|
||||
func parseString(_ message: String) -> Either<String, SocketPacket> {
|
||||
|
||||
/// Parses a message from the engine, returning a complete SocketPacket or throwing.
|
||||
///
|
||||
/// - parameter message: The message to parse.
|
||||
/// - returns: A completed packet, or throwing.
|
||||
internal func parseString(_ message: String) throws -> SocketPacket {
|
||||
var reader = SocketStringReader(message: message)
|
||||
|
||||
|
||||
guard let type = Int(reader.read(count: 1)).flatMap({ SocketPacket.PacketType(rawValue: $0) }) else {
|
||||
return .left("Invalid packet type")
|
||||
throw SocketParsableError.invalidPacketType
|
||||
}
|
||||
|
||||
|
||||
if !reader.hasNext {
|
||||
return .right(SocketPacket(type: type, nsp: "/"))
|
||||
return SocketPacket(type: type, nsp: "/")
|
||||
}
|
||||
|
||||
|
||||
var namespace = "/"
|
||||
var placeholders = -1
|
||||
|
||||
|
||||
if type == .binaryEvent || type == .binaryAck {
|
||||
if let holders = Int(reader.readUntilOccurence(of: "-")) {
|
||||
placeholders = holders
|
||||
} else {
|
||||
return .left("Invalid packet")
|
||||
throw SocketParsableError.invalidPacket
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if reader.currentCharacter == "/" {
|
||||
namespace = reader.readUntilOccurence(of: ",")
|
||||
namespace = reader.readUntilOccurence(of: ",")
|
||||
}
|
||||
|
||||
|
||||
if !reader.hasNext {
|
||||
return .right(SocketPacket(type: type, nsp: namespace, placeholders: placeholders))
|
||||
return SocketPacket(type: type, nsp: namespace, placeholders: placeholders)
|
||||
}
|
||||
|
||||
|
||||
var idString = ""
|
||||
|
||||
|
||||
if type == .error {
|
||||
reader.advance(by: -1)
|
||||
} else {
|
||||
@@ -106,57 +145,64 @@ extension SocketParsable where Self: SocketIOClientSpec {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var dataArray = String(message.utf16[message.utf16.index(reader.currentIndex, offsetBy: 1)..<message.utf16.endIndex])!
|
||||
|
||||
|
||||
if type == .error && !dataArray.hasPrefix("[") && !dataArray.hasSuffix("]") {
|
||||
dataArray = "[" + dataArray + "]"
|
||||
}
|
||||
|
||||
switch parseData(dataArray) {
|
||||
case let .left(err):
|
||||
return .left(err)
|
||||
case let .right(data):
|
||||
return .right(SocketPacket(type: type, data: data, id: Int(idString) ?? -1,
|
||||
nsp: namespace, placeholders: placeholders))
|
||||
}
|
||||
|
||||
let data = try parseData(dataArray)
|
||||
|
||||
return SocketPacket(type: type, data: data, id: Int(idString) ?? -1, nsp: namespace, placeholders: placeholders)
|
||||
}
|
||||
|
||||
|
||||
// Parses data for events
|
||||
private func parseData(_ data: String) -> Either<String, [Any]> {
|
||||
private func parseData(_ data: String) throws -> [Any] {
|
||||
do {
|
||||
return .right(try data.toArray())
|
||||
return try data.toArray()
|
||||
} catch {
|
||||
return .left("Error parsing data for packet")
|
||||
throw SocketParsableError.invalidDataArray
|
||||
}
|
||||
}
|
||||
|
||||
// Parses messages recieved
|
||||
func parseSocketMessage(_ message: String) {
|
||||
|
||||
/// Called when the engine has received a string that should be parsed into a socket.io packet.
|
||||
///
|
||||
/// - parameter message: The string that needs parsing.
|
||||
public func parseSocketMessage(_ message: String) {
|
||||
guard !message.isEmpty else { return }
|
||||
|
||||
DefaultSocketLogger.Logger.log("Parsing %@", type: "SocketParser", args: message)
|
||||
|
||||
switch parseString(message) {
|
||||
case let .left(err):
|
||||
DefaultSocketLogger.Logger.error("\(err): %@", type: "SocketParser", args: message)
|
||||
case let .right(pack):
|
||||
DefaultSocketLogger.Logger.log("Decoded packet as: %@", type: "SocketParser", args: pack.description)
|
||||
handlePacket(pack)
|
||||
|
||||
DefaultSocketLogger.Logger.log("Parsing \(message)", type: "SocketParser")
|
||||
|
||||
do {
|
||||
let packet = try parseString(message)
|
||||
|
||||
DefaultSocketLogger.Logger.log("Decoded packet as: \(packet.description)", type: "SocketParser")
|
||||
|
||||
handlePacket(packet)
|
||||
} catch {
|
||||
DefaultSocketLogger.Logger.error("\(error): \(message)", type: "SocketParser")
|
||||
}
|
||||
}
|
||||
|
||||
func parseBinaryData(_ data: Data) {
|
||||
|
||||
/// Called when the engine has received some binary data that should be attached to a packet.
|
||||
///
|
||||
/// Packets binary data should be sent directly after the packet that expects it, so there's confusion over
|
||||
/// where the data should go. Data should be received in the order it is sent, so that the correct data is put
|
||||
/// into the correct placeholder.
|
||||
///
|
||||
/// - parameter data: The data that should be attached to a packet.
|
||||
public func parseBinaryData(_ data: Data) {
|
||||
guard !waitingPackets.isEmpty else {
|
||||
DefaultSocketLogger.Logger.error("Got data when not remaking packet", type: "SocketParser")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// Should execute event?
|
||||
guard waitingPackets[waitingPackets.count - 1].addData(data) else { return }
|
||||
|
||||
|
||||
let packet = waitingPackets.removeLast()
|
||||
|
||||
|
||||
if packet.type != .binaryAck {
|
||||
handleEvent(packet.event, data: packet.args, isInternalMessage: false, withAck: packet.id)
|
||||
} else {
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// SSLSecurity.swift
|
||||
// SocketIO-iOS
|
||||
//
|
||||
// Created by Lukas Schmidt on 24.09.17.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
/// A wrapper around Starscream's SSLSecurity that provides a minimal Objective-C interface.
|
||||
open class SSLSecurity : NSObject {
|
||||
/// The internal Starscream SSLSecurity.
|
||||
public let security: Starscream.SSLSecurity
|
||||
|
||||
init(security: Starscream.SSLSecurity) {
|
||||
self.security = security
|
||||
}
|
||||
|
||||
/// Creates a new SSLSecurity that specifies whether to use publicKeys or certificates should be used for SSL
|
||||
/// pinning validation
|
||||
///
|
||||
/// - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning
|
||||
/// validation
|
||||
@objc
|
||||
public convenience init(usePublicKeys: Bool = true) {
|
||||
let security = Starscream.SSLSecurity(usePublicKeys: usePublicKeys)
|
||||
self.init(security: security)
|
||||
}
|
||||
|
||||
|
||||
/// Designated init
|
||||
///
|
||||
/// - parameter certs: is the certificates or public keys to use
|
||||
/// - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning
|
||||
/// validation
|
||||
/// - returns: a representation security object to be used with
|
||||
public convenience init(certs: [SSLCert], usePublicKeys: Bool) {
|
||||
let security = Starscream.SSLSecurity(certs: certs, usePublicKeys: usePublicKeys)
|
||||
self.init(security: security)
|
||||
}
|
||||
|
||||
/// Returns whether or not the given trust is valid.
|
||||
///
|
||||
/// - parameter trust: The trust to validate.
|
||||
/// - parameter domain: The CN domain to validate.
|
||||
/// - returns: Whether or not this is valid.
|
||||
public func isValid(_ trust: SecTrust, domain: String?) -> Bool {
|
||||
return security.isValid(trust, domain: domain)
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,7 @@ open class SocketClientManager : NSObject {
|
||||
// MARK: Properties.
|
||||
|
||||
/// The shared manager.
|
||||
@objc
|
||||
open static let sharedManager = SocketClientManager()
|
||||
|
||||
private var sockets = [String: SocketIOClient]()
|
||||
@@ -70,6 +71,7 @@ open class SocketClientManager : NSObject {
|
||||
///
|
||||
/// - parameter socket: The socket to add.
|
||||
/// - parameter labeledAs: The label for this socket.
|
||||
@objc
|
||||
open func addSocket(_ socket: SocketIOClient, labeledAs label: String) {
|
||||
sockets[label] = socket
|
||||
}
|
||||
@@ -78,6 +80,7 @@ open class SocketClientManager : NSObject {
|
||||
///
|
||||
/// - parameter withLabel: The label of the socket to remove.
|
||||
/// - returns: The socket for the given label, if one was present.
|
||||
@objc
|
||||
@discardableResult
|
||||
open func removeSocket(withLabel label: String) -> SocketIOClient? {
|
||||
return sockets.removeValue(forKey: label)
|
||||
@@ -87,6 +90,7 @@ open class SocketClientManager : NSObject {
|
||||
///
|
||||
/// - parameter socket: The socket to remove.
|
||||
/// - returns: The socket if it was in the manager.
|
||||
@objc
|
||||
@discardableResult
|
||||
open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient? {
|
||||
var returnSocket: SocketIOClient?
|
||||
@@ -99,6 +103,7 @@ open class SocketClientManager : NSObject {
|
||||
}
|
||||
|
||||
/// Removes all the sockets in the manager.
|
||||
@objc
|
||||
open func removeSockets() {
|
||||
sockets.removeAll()
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Foundation
|
||||
import Starscream
|
||||
|
||||
enum JSONError : Error {
|
||||
case notArray
|
||||
@@ -80,8 +81,8 @@ extension NSDictionary {
|
||||
return .selfSigned(selfSigned)
|
||||
case let ("sessionDelegate", delegate as URLSessionDelegate):
|
||||
return .sessionDelegate(delegate)
|
||||
case let ("voipEnabled", enable as Bool):
|
||||
return .voipEnabled(enable)
|
||||
case let ("compress", compress as Bool):
|
||||
return compress ? .compress : nil
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
@@ -110,9 +111,9 @@ extension String {
|
||||
return array
|
||||
}
|
||||
|
||||
func toNSDictionary() throws -> NSDictionary {
|
||||
func toDictionary() throws -> [String: Any] {
|
||||
guard let binData = data(using: .utf16, allowLossyConversion: false) else { return [:] }
|
||||
guard let json = try JSONSerialization.jsonObject(with: binData, options: .allowFragments) as? NSDictionary else {
|
||||
guard let json = try JSONSerialization.jsonObject(with: binData, options: .allowFragments) as? [String: Any] else {
|
||||
throw JSONError.notNSDictionary
|
||||
}
|
||||
|
||||
@@ -38,34 +38,31 @@ public protocol SocketLogger : class {
|
||||
/// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`
|
||||
/// - parameter type: The type of entity that called for logging.
|
||||
/// - parameter args: Any args that should be inserted into the message. May be left out.
|
||||
func log(_ message: String, type: String, args: Any...)
|
||||
func log(_ message: @autoclosure () -> String, type: String)
|
||||
|
||||
/// Error Messages
|
||||
///
|
||||
/// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`
|
||||
/// - parameter type: The type of entity that called for logging.
|
||||
/// - parameter args: Any args that should be inserted into the message. May be left out.
|
||||
func error(_ message: String, type: String, args: Any...)
|
||||
func error(_ message: @autoclosure () -> String, type: String)
|
||||
}
|
||||
|
||||
public extension SocketLogger {
|
||||
/// Default implementation.
|
||||
func log(_ message: String, type: String, args: Any...) {
|
||||
abstractLog("LOG", message: message, type: type, args: args)
|
||||
func log(_ message: @autoclosure () -> String, type: String) {
|
||||
abstractLog("LOG", message: message, type: type)
|
||||
}
|
||||
|
||||
/// Default implementation.
|
||||
func error(_ message: String, type: String, args: Any...) {
|
||||
abstractLog("ERROR", message: message, type: type, args: args)
|
||||
func error(_ message: @autoclosure () -> String, type: String) {
|
||||
abstractLog("ERROR", message: message, type: type)
|
||||
}
|
||||
|
||||
private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {
|
||||
private func abstractLog(_ logType: String, message: @autoclosure () -> String, type: String) {
|
||||
guard log else { return }
|
||||
|
||||
let newArgs = args.map({arg -> CVarArg in String(describing: arg)})
|
||||
let messageFormat = String(format: message, arguments: newArgs)
|
||||
|
||||
NSLog("\(logType) \(type): %@", messageFormat)
|
||||
NSLog("\(logType) \(type): %@", message())
|
||||
}
|
||||
}
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,68 +0,0 @@
|
||||
//
|
||||
// SocketIOClientSpec.swift
|
||||
// Socket.IO-Client-Swift
|
||||
//
|
||||
// Created by Erik Little on 1/3/16.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
import Dispatch
|
||||
|
||||
protocol SocketIOClientSpec : class {
|
||||
var handleQueue: DispatchQueue { get set }
|
||||
var nsp: String { get set }
|
||||
var waitingPackets: [SocketPacket] { get set }
|
||||
|
||||
func didConnect()
|
||||
func didDisconnect(reason: String)
|
||||
func didError(reason: String)
|
||||
func handleAck(_ ack: Int, data: [Any])
|
||||
func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)
|
||||
func handleClientEvent(_ event: SocketClientEvent, data: [Any])
|
||||
func joinNamespace(_ namespace: String)
|
||||
}
|
||||
|
||||
extension SocketIOClientSpec {
|
||||
func didError(reason: String) {
|
||||
DefaultSocketLogger.Logger.error("%@", type: "SocketIOClient", args: reason)
|
||||
|
||||
handleClientEvent(.error, data: [reason])
|
||||
}
|
||||
}
|
||||
|
||||
/// The set of events that are generated by the client.
|
||||
public enum SocketClientEvent : String {
|
||||
/// Emitted when the client connects. This is also called on a successful reconnection.
|
||||
case connect
|
||||
|
||||
/// Called when the socket has disconnected and will not attempt to try to reconnect.
|
||||
case disconnect
|
||||
|
||||
/// Called when an error occurs.
|
||||
case error
|
||||
|
||||
/// Called when the client begins the reconnection process.
|
||||
case reconnect
|
||||
|
||||
/// Called each time the client tries to reconnect to the server.
|
||||
case reconnectAttempt
|
||||
|
||||
/// Called every time there is a change in the client's status.
|
||||
case statusChange
|
||||
}
|
||||
@@ -1,955 +0,0 @@
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Websocket.swift
|
||||
//
|
||||
// Created by Dalton Cherry on 7/16/14.
|
||||
// Copyright (c) 2014-2016 Dalton Cherry.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
import Foundation
|
||||
import CoreFoundation
|
||||
import Security
|
||||
|
||||
public let WebsocketDidConnectNotification = "WebsocketDidConnectNotification"
|
||||
public let WebsocketDidDisconnectNotification = "WebsocketDidDisconnectNotification"
|
||||
public let WebsocketDisconnectionErrorKeyName = "WebsocketDisconnectionErrorKeyName"
|
||||
|
||||
public protocol WebSocketDelegate: class {
|
||||
func websocketDidConnect(socket: WebSocket)
|
||||
func websocketDidDisconnect(socket: WebSocket, error: NSError?)
|
||||
func websocketDidReceiveMessage(socket: WebSocket, text: String)
|
||||
func websocketDidReceiveData(socket: WebSocket, data: Data)
|
||||
}
|
||||
|
||||
public protocol WebSocketPongDelegate: class {
|
||||
func websocketDidReceivePong(socket: WebSocket, data: Data?)
|
||||
}
|
||||
|
||||
open class WebSocket : NSObject, StreamDelegate {
|
||||
|
||||
enum OpCode : UInt8 {
|
||||
case continueFrame = 0x0
|
||||
case textFrame = 0x1
|
||||
case binaryFrame = 0x2
|
||||
// 3-7 are reserved.
|
||||
case connectionClose = 0x8
|
||||
case ping = 0x9
|
||||
case pong = 0xA
|
||||
// B-F reserved.
|
||||
}
|
||||
|
||||
public enum CloseCode : UInt16 {
|
||||
case normal = 1000
|
||||
case goingAway = 1001
|
||||
case protocolError = 1002
|
||||
case protocolUnhandledType = 1003
|
||||
// 1004 reserved.
|
||||
case noStatusReceived = 1005
|
||||
//1006 reserved.
|
||||
case encoding = 1007
|
||||
case policyViolated = 1008
|
||||
case messageTooBig = 1009
|
||||
}
|
||||
|
||||
public static let ErrorDomain = "WebSocket"
|
||||
|
||||
enum InternalErrorCode: UInt16 {
|
||||
// 0-999 WebSocket status codes not used
|
||||
case outputStreamWriteError = 1
|
||||
}
|
||||
|
||||
// Where the callback is executed. It defaults to the main UI thread queue.
|
||||
public var callbackQueue = DispatchQueue.main
|
||||
|
||||
var optionalProtocols: [String]?
|
||||
|
||||
// MARK: - Constants
|
||||
let headerWSUpgradeName = "Upgrade"
|
||||
let headerWSUpgradeValue = "websocket"
|
||||
let headerWSHostName = "Host"
|
||||
let headerWSConnectionName = "Connection"
|
||||
let headerWSConnectionValue = "Upgrade"
|
||||
let headerWSProtocolName = "Sec-WebSocket-Protocol"
|
||||
let headerWSVersionName = "Sec-WebSocket-Version"
|
||||
let headerWSVersionValue = "13"
|
||||
let headerWSKeyName = "Sec-WebSocket-Key"
|
||||
let headerOriginName = "Origin"
|
||||
let headerWSAcceptName = "Sec-WebSocket-Accept"
|
||||
let BUFFER_MAX = 4096
|
||||
let FinMask: UInt8 = 0x80
|
||||
let OpCodeMask: UInt8 = 0x0F
|
||||
let RSVMask: UInt8 = 0x70
|
||||
let MaskMask: UInt8 = 0x80
|
||||
let PayloadLenMask: UInt8 = 0x7F
|
||||
let MaxFrameSize: Int = 32
|
||||
let httpSwitchProtocolCode = 101
|
||||
let supportedSSLSchemes = ["wss", "https"]
|
||||
|
||||
class WSResponse {
|
||||
var isFin = false
|
||||
var code: OpCode = .continueFrame
|
||||
var bytesLeft = 0
|
||||
var frameCount = 0
|
||||
var buffer: NSMutableData?
|
||||
}
|
||||
|
||||
// MARK: - Delegates
|
||||
/// Responds to callback about new messages coming in over the WebSocket
|
||||
/// and also connection/disconnect messages.
|
||||
public weak var delegate: WebSocketDelegate?
|
||||
|
||||
/// Receives a callback for each pong message recived.
|
||||
public weak var pongDelegate: WebSocketPongDelegate?
|
||||
|
||||
|
||||
// MARK: - Block based API.
|
||||
public var onConnect: (() -> Void)?
|
||||
public var onDisconnect: ((NSError?) -> Void)?
|
||||
public var onText: ((String) -> Void)?
|
||||
public var onData: ((Data) -> Void)?
|
||||
public var onPong: ((Data?) -> Void)?
|
||||
|
||||
public var headers = [String: String]()
|
||||
public var voipEnabled = false
|
||||
public var disableSSLCertValidation = false
|
||||
public var security: SSLTrustValidator?
|
||||
public var enabledSSLCipherSuites: [SSLCipherSuite]?
|
||||
public var origin: String?
|
||||
public var timeout = 5
|
||||
public var isConnected: Bool {
|
||||
return connected
|
||||
}
|
||||
|
||||
public var currentURL: URL { return url }
|
||||
|
||||
// MARK: - Private
|
||||
private var url: URL
|
||||
private var inputStream: InputStream?
|
||||
private var outputStream: OutputStream?
|
||||
private var connected = false
|
||||
private var isConnecting = false
|
||||
private var writeQueue = OperationQueue()
|
||||
private var readStack = [WSResponse]()
|
||||
private var inputQueue = [Data]()
|
||||
private var fragBuffer: Data?
|
||||
private var certValidated = false
|
||||
private var didDisconnect = false
|
||||
private var readyToWrite = false
|
||||
private let mutex = NSLock()
|
||||
private let notificationCenter = NotificationCenter.default
|
||||
private var canDispatch: Bool {
|
||||
mutex.lock()
|
||||
let canWork = readyToWrite
|
||||
mutex.unlock()
|
||||
return canWork
|
||||
}
|
||||
/// The shared processing queue used for all WebSocket.
|
||||
private static let sharedWorkQueue = DispatchQueue(label: "com.vluxe.starscream.websocket", attributes: [])
|
||||
|
||||
/// Used for setting protocols.
|
||||
public init(url: URL, protocols: [String]? = nil) {
|
||||
self.url = url
|
||||
self.origin = url.absoluteString
|
||||
if let hostUrl = URL (string: "/", relativeTo: url) {
|
||||
var origin = hostUrl.absoluteString
|
||||
origin.remove(at: origin.index(before: origin.endIndex))
|
||||
self.origin = origin
|
||||
}
|
||||
writeQueue.maxConcurrentOperationCount = 1
|
||||
optionalProtocols = protocols
|
||||
}
|
||||
|
||||
// Used for specifically setting the QOS for the write queue.
|
||||
public convenience init(url: URL, writeQueueQOS: QualityOfService, protocols: [String]? = nil) {
|
||||
self.init(url: url, protocols: protocols)
|
||||
writeQueue.qualityOfService = writeQueueQOS
|
||||
}
|
||||
|
||||
/**
|
||||
Connect to the WebSocket server on a background thread.
|
||||
*/
|
||||
open func connect() {
|
||||
guard !isConnecting else { return }
|
||||
didDisconnect = false
|
||||
isConnecting = true
|
||||
createHTTPRequest()
|
||||
}
|
||||
|
||||
/**
|
||||
Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.
|
||||
If you supply a non-nil `forceTimeout`, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.
|
||||
If you supply a zero (or negative) `forceTimeout`, I immediately close the socket (without sending a Close control frame) and notify my delegate.
|
||||
- Parameter forceTimeout: Maximum time to wait for the server to close the socket.
|
||||
- Parameter closeCode: The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.
|
||||
*/
|
||||
open func disconnect(forceTimeout: TimeInterval? = nil, closeCode: UInt16 = CloseCode.normal.rawValue) {
|
||||
guard isConnected else { return }
|
||||
switch forceTimeout {
|
||||
case .some(let seconds) where seconds > 0:
|
||||
let milliseconds = Int(seconds * 1_000)
|
||||
callbackQueue.asyncAfter(deadline: .now() + .milliseconds(milliseconds)) { [weak self] in
|
||||
self?.disconnectStream(nil)
|
||||
}
|
||||
fallthrough
|
||||
case .none:
|
||||
writeError(closeCode)
|
||||
default:
|
||||
disconnectStream(nil)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Write a string to the websocket. This sends it as a text frame.
|
||||
If you supply a non-nil completion block, I will perform it when the write completes.
|
||||
- parameter string: The string to write.
|
||||
- parameter completion: The (optional) completion handler.
|
||||
*/
|
||||
open func write(string: String, completion: (() -> ())? = nil) {
|
||||
guard isConnected else { return }
|
||||
dequeueWrite(string.data(using: String.Encoding.utf8)!, code: .textFrame, writeCompletion: completion)
|
||||
}
|
||||
|
||||
/**
|
||||
Write binary data to the websocket. This sends it as a binary frame.
|
||||
If you supply a non-nil completion block, I will perform it when the write completes.
|
||||
- parameter data: The data to write.
|
||||
- parameter completion: The (optional) completion handler.
|
||||
*/
|
||||
open func write(data: Data, completion: (() -> ())? = nil) {
|
||||
guard isConnected else { return }
|
||||
dequeueWrite(data, code: .binaryFrame, writeCompletion: completion)
|
||||
}
|
||||
|
||||
/**
|
||||
Write a ping to the websocket. This sends it as a control frame.
|
||||
Yodel a sound to the planet. This sends it as an astroid. http://youtu.be/Eu5ZJELRiJ8?t=42s
|
||||
*/
|
||||
open func write(ping: Data, completion: (() -> ())? = nil) {
|
||||
guard isConnected else { return }
|
||||
dequeueWrite(ping, code: .ping, writeCompletion: completion)
|
||||
}
|
||||
|
||||
/**
|
||||
Private method that starts the connection.
|
||||
*/
|
||||
private func createHTTPRequest() {
|
||||
let urlRequest = CFHTTPMessageCreateRequest(kCFAllocatorDefault, "GET" as CFString,
|
||||
url as CFURL, kCFHTTPVersion1_1).takeRetainedValue()
|
||||
|
||||
var port = url.port
|
||||
if port == nil {
|
||||
if supportedSSLSchemes.contains(url.scheme!) {
|
||||
port = 443
|
||||
} else {
|
||||
port = 80
|
||||
}
|
||||
}
|
||||
addHeader(urlRequest, key: headerWSUpgradeName, val: headerWSUpgradeValue)
|
||||
addHeader(urlRequest, key: headerWSConnectionName, val: headerWSConnectionValue)
|
||||
if let protocols = optionalProtocols {
|
||||
addHeader(urlRequest, key: headerWSProtocolName, val: protocols.joined(separator: ","))
|
||||
}
|
||||
addHeader(urlRequest, key: headerWSVersionName, val: headerWSVersionValue)
|
||||
addHeader(urlRequest, key: headerWSKeyName, val: generateWebSocketKey())
|
||||
if let origin = origin {
|
||||
addHeader(urlRequest, key: headerOriginName, val: origin)
|
||||
}
|
||||
addHeader(urlRequest, key: headerWSHostName, val: "\(url.host!):\(port!)")
|
||||
for (key, value) in headers {
|
||||
addHeader(urlRequest, key: key, val: value)
|
||||
}
|
||||
if let cfHTTPMessage = CFHTTPMessageCopySerializedMessage(urlRequest) {
|
||||
let serializedRequest = cfHTTPMessage.takeRetainedValue()
|
||||
initStreamsWithData(serializedRequest as Data, Int(port!))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Add a header to the CFHTTPMessage by using the NSString bridges to CFString
|
||||
*/
|
||||
private func addHeader(_ urlRequest: CFHTTPMessage, key: String, val: String) {
|
||||
CFHTTPMessageSetHeaderFieldValue(urlRequest, key as CFString, val as CFString)
|
||||
}
|
||||
|
||||
/**
|
||||
Generate a WebSocket key as needed in RFC.
|
||||
*/
|
||||
private func generateWebSocketKey() -> String {
|
||||
var key = ""
|
||||
let seed = 16
|
||||
for _ in 0..<seed {
|
||||
let uni = UnicodeScalar(UInt32(97 + arc4random_uniform(25)))
|
||||
key += "\(Character(uni!))"
|
||||
}
|
||||
let data = key.data(using: String.Encoding.utf8)
|
||||
let baseKey = data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0))
|
||||
return baseKey!
|
||||
}
|
||||
|
||||
/**
|
||||
Start the stream connection and write the data to the output stream.
|
||||
*/
|
||||
private func initStreamsWithData(_ data: Data, _ port: Int) {
|
||||
//higher level API we will cut over to at some point
|
||||
//NSStream.getStreamsToHostWithName(url.host, port: url.port.integerValue, inputStream: &inputStream, outputStream: &outputStream)
|
||||
// Disconnect and clean up any existing streams before setting up a new pair
|
||||
disconnectStream(nil, runDelegate: false)
|
||||
|
||||
var readStream: Unmanaged<CFReadStream>?
|
||||
var writeStream: Unmanaged<CFWriteStream>?
|
||||
let h = url.host! as NSString
|
||||
CFStreamCreatePairWithSocketToHost(nil, h, UInt32(port), &readStream, &writeStream)
|
||||
inputStream = readStream!.takeRetainedValue()
|
||||
outputStream = writeStream!.takeRetainedValue()
|
||||
guard let inStream = inputStream, let outStream = outputStream else { return }
|
||||
inStream.delegate = self
|
||||
outStream.delegate = self
|
||||
if supportedSSLSchemes.contains(url.scheme!) {
|
||||
certValidated = false
|
||||
inStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)
|
||||
outStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)
|
||||
if disableSSLCertValidation {
|
||||
let settings: [NSObject: NSObject] = [kCFStreamSSLValidatesCertificateChain: NSNumber(value: false), kCFStreamSSLPeerName: kCFNull]
|
||||
inStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)
|
||||
outStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)
|
||||
}
|
||||
if let cipherSuites = self.enabledSSLCipherSuites {
|
||||
if let sslContextIn = CFReadStreamCopyProperty(inputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext?,
|
||||
let sslContextOut = CFWriteStreamCopyProperty(outputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext? {
|
||||
let resIn = SSLSetEnabledCiphers(sslContextIn, cipherSuites, cipherSuites.count)
|
||||
let resOut = SSLSetEnabledCiphers(sslContextOut, cipherSuites, cipherSuites.count)
|
||||
if resIn != errSecSuccess {
|
||||
let error = self.errorWithDetail("Error setting ingoing cypher suites", code: UInt16(resIn))
|
||||
disconnectStream(error)
|
||||
return
|
||||
}
|
||||
if resOut != errSecSuccess {
|
||||
let error = self.errorWithDetail("Error setting outgoing cypher suites", code: UInt16(resOut))
|
||||
disconnectStream(error)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
certValidated = true //not a https session, so no need to check SSL pinning
|
||||
}
|
||||
if voipEnabled {
|
||||
inStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)
|
||||
outStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)
|
||||
}
|
||||
|
||||
CFReadStreamSetDispatchQueue(inStream, WebSocket.sharedWorkQueue)
|
||||
CFWriteStreamSetDispatchQueue(outStream, WebSocket.sharedWorkQueue)
|
||||
inStream.open()
|
||||
outStream.open()
|
||||
|
||||
self.mutex.lock()
|
||||
self.readyToWrite = true
|
||||
self.mutex.unlock()
|
||||
|
||||
let bytes = UnsafeRawPointer((data as NSData).bytes).assumingMemoryBound(to: UInt8.self)
|
||||
var out = timeout * 1_000_000 // wait 5 seconds before giving up
|
||||
let operation = BlockOperation()
|
||||
operation.addExecutionBlock { [weak self, weak operation] in
|
||||
guard let sOperation = operation else { return }
|
||||
while !outStream.hasSpaceAvailable && !sOperation.isCancelled {
|
||||
usleep(100) // wait until the socket is ready
|
||||
guard !sOperation.isCancelled else { return }
|
||||
out -= 100
|
||||
if out < 0 {
|
||||
WebSocket.sharedWorkQueue.async {
|
||||
self?.cleanupStream()
|
||||
}
|
||||
self?.doDisconnect(self?.errorWithDetail("write wait timed out", code: 2))
|
||||
return
|
||||
} else if outStream.streamError != nil {
|
||||
return // disconnectStream will be called.
|
||||
}
|
||||
}
|
||||
guard !sOperation.isCancelled, let s = self else { return }
|
||||
// Do the pinning now if needed
|
||||
if let sec = s.security, !s.certValidated {
|
||||
let trust = outStream.property(forKey: kCFStreamPropertySSLPeerTrust as Stream.PropertyKey) as! SecTrust
|
||||
let domain = outStream.property(forKey: kCFStreamSSLPeerName as Stream.PropertyKey) as? String
|
||||
s.certValidated = sec.isValid(trust, domain: domain)
|
||||
if !s.certValidated {
|
||||
WebSocket.sharedWorkQueue.async {
|
||||
let error = s.errorWithDetail("Invalid SSL certificate", code: 1)
|
||||
s.disconnectStream(error)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
outStream.write(bytes, maxLength: data.count)
|
||||
}
|
||||
writeQueue.addOperation(operation)
|
||||
}
|
||||
|
||||
/**
|
||||
Delegate for the stream methods. Processes incoming bytes
|
||||
*/
|
||||
open func stream(_ aStream: Stream, handle eventCode: Stream.Event) {
|
||||
if eventCode == .hasBytesAvailable {
|
||||
if aStream == inputStream {
|
||||
processInputStream()
|
||||
}
|
||||
} else if eventCode == .errorOccurred {
|
||||
disconnectStream(aStream.streamError as NSError?)
|
||||
} else if eventCode == .endEncountered {
|
||||
disconnectStream(nil)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Disconnect the stream object and notifies the delegate.
|
||||
*/
|
||||
private func disconnectStream(_ error: NSError?, runDelegate: Bool = true) {
|
||||
if error == nil {
|
||||
writeQueue.waitUntilAllOperationsAreFinished()
|
||||
} else {
|
||||
writeQueue.cancelAllOperations()
|
||||
}
|
||||
cleanupStream()
|
||||
connected = false
|
||||
if runDelegate {
|
||||
doDisconnect(error)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
cleanup the streams.
|
||||
*/
|
||||
private func cleanupStream() {
|
||||
outputStream?.delegate = nil
|
||||
inputStream?.delegate = nil
|
||||
if let stream = inputStream {
|
||||
CFReadStreamSetDispatchQueue(stream, nil)
|
||||
stream.close()
|
||||
}
|
||||
if let stream = outputStream {
|
||||
CFWriteStreamSetDispatchQueue(stream, nil)
|
||||
stream.close()
|
||||
}
|
||||
outputStream = nil
|
||||
inputStream = nil
|
||||
fragBuffer = nil
|
||||
}
|
||||
|
||||
/**
|
||||
Handles the incoming bytes and sending them to the proper processing method.
|
||||
*/
|
||||
private func processInputStream() {
|
||||
let buf = NSMutableData(capacity: BUFFER_MAX)
|
||||
let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)
|
||||
let length = inputStream!.read(buffer, maxLength: BUFFER_MAX)
|
||||
guard length > 0 else { return }
|
||||
var process = false
|
||||
if inputQueue.count == 0 {
|
||||
process = true
|
||||
}
|
||||
inputQueue.append(Data(bytes: buffer, count: length))
|
||||
if process {
|
||||
dequeueInput()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Dequeue the incoming input so it is processed in order.
|
||||
*/
|
||||
private func dequeueInput() {
|
||||
while !inputQueue.isEmpty {
|
||||
autoreleasepool {
|
||||
let data = inputQueue[0]
|
||||
var work = data
|
||||
if let buffer = fragBuffer {
|
||||
var combine = NSData(data: buffer) as Data
|
||||
combine.append(data)
|
||||
work = combine
|
||||
fragBuffer = nil
|
||||
}
|
||||
let buffer = UnsafeRawPointer((work as NSData).bytes).assumingMemoryBound(to: UInt8.self)
|
||||
let length = work.count
|
||||
if !connected {
|
||||
processTCPHandshake(buffer, bufferLen: length)
|
||||
} else {
|
||||
processRawMessagesInBuffer(buffer, bufferLen: length)
|
||||
}
|
||||
inputQueue = inputQueue.filter{ $0 != data }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Handle checking the inital connection status
|
||||
*/
|
||||
private func processTCPHandshake(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) {
|
||||
let code = processHTTP(buffer, bufferLen: bufferLen)
|
||||
switch code {
|
||||
case 0:
|
||||
break
|
||||
case -1:
|
||||
fragBuffer = Data(bytes: buffer, count: bufferLen)
|
||||
break // do nothing, we are going to collect more data
|
||||
default:
|
||||
doDisconnect(errorWithDetail("Invalid HTTP upgrade", code: UInt16(code)))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Finds the HTTP Packet in the TCP stream, by looking for the CRLF.
|
||||
*/
|
||||
private func processHTTP(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {
|
||||
let CRLFBytes = [UInt8(ascii: "\r"), UInt8(ascii: "\n"), UInt8(ascii: "\r"), UInt8(ascii: "\n")]
|
||||
var k = 0
|
||||
var totalSize = 0
|
||||
for i in 0..<bufferLen {
|
||||
if buffer[i] == CRLFBytes[k] {
|
||||
k += 1
|
||||
if k == 3 {
|
||||
totalSize = i + 1
|
||||
break
|
||||
}
|
||||
} else {
|
||||
k = 0
|
||||
}
|
||||
}
|
||||
if totalSize > 0 {
|
||||
let code = validateResponse(buffer, bufferLen: totalSize)
|
||||
if code != 0 {
|
||||
return code
|
||||
}
|
||||
isConnecting = false
|
||||
connected = true
|
||||
didDisconnect = false
|
||||
if canDispatch {
|
||||
callbackQueue.async { [weak self] in
|
||||
guard let s = self else { return }
|
||||
s.onConnect?()
|
||||
s.delegate?.websocketDidConnect(socket: s)
|
||||
s.notificationCenter.post(name: NSNotification.Name(WebsocketDidConnectNotification), object: self)
|
||||
}
|
||||
}
|
||||
totalSize += 1 //skip the last \n
|
||||
let restSize = bufferLen - totalSize
|
||||
if restSize > 0 {
|
||||
processRawMessagesInBuffer(buffer + totalSize, bufferLen: restSize)
|
||||
}
|
||||
return 0 //success
|
||||
}
|
||||
return -1 // Was unable to find the full TCP header.
|
||||
}
|
||||
|
||||
/**
|
||||
Validates the HTTP is a 101 as per the RFC spec.
|
||||
*/
|
||||
private func validateResponse(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {
|
||||
let response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, false).takeRetainedValue()
|
||||
CFHTTPMessageAppendBytes(response, buffer, bufferLen)
|
||||
let code = CFHTTPMessageGetResponseStatusCode(response)
|
||||
if code != httpSwitchProtocolCode {
|
||||
return code
|
||||
}
|
||||
if let cfHeaders = CFHTTPMessageCopyAllHeaderFields(response) {
|
||||
let headers = cfHeaders.takeRetainedValue() as NSDictionary
|
||||
if let acceptKey = headers[headerWSAcceptName as NSString] as? NSString {
|
||||
if acceptKey.length > 0 {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
/**
|
||||
Read a 16 bit big endian value from a buffer
|
||||
*/
|
||||
private static func readUint16(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt16 {
|
||||
return (UInt16(buffer[offset + 0]) << 8) | UInt16(buffer[offset + 1])
|
||||
}
|
||||
|
||||
/**
|
||||
Read a 64 bit big endian value from a buffer
|
||||
*/
|
||||
private static func readUint64(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt64 {
|
||||
var value = UInt64(0)
|
||||
for i in 0...7 {
|
||||
value = (value << 8) | UInt64(buffer[offset + i])
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
/**
|
||||
Write a 16-bit big endian value to a buffer.
|
||||
*/
|
||||
private static func writeUint16(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt16) {
|
||||
buffer[offset + 0] = UInt8(value >> 8)
|
||||
buffer[offset + 1] = UInt8(value & 0xff)
|
||||
}
|
||||
|
||||
/**
|
||||
Write a 64-bit big endian value to a buffer.
|
||||
*/
|
||||
private static func writeUint64(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt64) {
|
||||
for i in 0...7 {
|
||||
buffer[offset + i] = UInt8((value >> (8*UInt64(7 - i))) & 0xff)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Process one message at the start of `buffer`. Return another buffer (sharing storage) that contains the leftover contents of `buffer` that I didn't process.
|
||||
*/
|
||||
private func processOneRawMessage(inBuffer buffer: UnsafeBufferPointer<UInt8>) -> UnsafeBufferPointer<UInt8> {
|
||||
let response = readStack.last
|
||||
guard let baseAddress = buffer.baseAddress else {return emptyBuffer}
|
||||
let bufferLen = buffer.count
|
||||
if response != nil && bufferLen < 2 {
|
||||
fragBuffer = Data(buffer: buffer)
|
||||
return emptyBuffer
|
||||
}
|
||||
if let response = response, response.bytesLeft > 0 {
|
||||
var len = response.bytesLeft
|
||||
var extra = bufferLen - response.bytesLeft
|
||||
if response.bytesLeft > bufferLen {
|
||||
len = bufferLen
|
||||
extra = 0
|
||||
}
|
||||
response.bytesLeft -= len
|
||||
response.buffer?.append(Data(bytes: baseAddress, count: len))
|
||||
_ = processResponse(response)
|
||||
return buffer.fromOffset(bufferLen - extra)
|
||||
} else {
|
||||
let isFin = (FinMask & baseAddress[0])
|
||||
let receivedOpcodeRawValue = (OpCodeMask & baseAddress[0])
|
||||
let receivedOpcode = OpCode(rawValue: receivedOpcodeRawValue)
|
||||
let isMasked = (MaskMask & baseAddress[1])
|
||||
let payloadLen = (PayloadLenMask & baseAddress[1])
|
||||
var offset = 2
|
||||
if (isMasked > 0 || (RSVMask & baseAddress[0]) > 0) && receivedOpcode != .pong {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("masked and rsv data is not currently supported", code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
let isControlFrame = (receivedOpcode == .connectionClose || receivedOpcode == .ping)
|
||||
if !isControlFrame && (receivedOpcode != .binaryFrame && receivedOpcode != .continueFrame &&
|
||||
receivedOpcode != .textFrame && receivedOpcode != .pong) {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("unknown opcode: \(receivedOpcodeRawValue)", code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
if isControlFrame && isFin == 0 {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("control frames can't be fragmented", code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
var closeCode = CloseCode.normal.rawValue
|
||||
if receivedOpcode == .connectionClose {
|
||||
if payloadLen == 1 {
|
||||
closeCode = CloseCode.protocolError.rawValue
|
||||
} else if payloadLen > 1 {
|
||||
closeCode = WebSocket.readUint16(baseAddress, offset: offset)
|
||||
if closeCode < 1000 || (closeCode > 1003 && closeCode < 1007) || (closeCode > 1011 && closeCode < 3000) {
|
||||
closeCode = CloseCode.protocolError.rawValue
|
||||
}
|
||||
}
|
||||
if payloadLen < 2 {
|
||||
doDisconnect(errorWithDetail("connection closed by server", code: closeCode))
|
||||
writeError(closeCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
} else if isControlFrame && payloadLen > 125 {
|
||||
writeError(CloseCode.protocolError.rawValue)
|
||||
return emptyBuffer
|
||||
}
|
||||
var dataLength = UInt64(payloadLen)
|
||||
if dataLength == 127 {
|
||||
dataLength = WebSocket.readUint64(baseAddress, offset: offset)
|
||||
offset += MemoryLayout<UInt64>.size
|
||||
} else if dataLength == 126 {
|
||||
dataLength = UInt64(WebSocket.readUint16(baseAddress, offset: offset))
|
||||
offset += MemoryLayout<UInt16>.size
|
||||
}
|
||||
if bufferLen < offset || UInt64(bufferLen - offset) < dataLength {
|
||||
fragBuffer = Data(bytes: baseAddress, count: bufferLen)
|
||||
return emptyBuffer
|
||||
}
|
||||
var len = dataLength
|
||||
if dataLength > UInt64(bufferLen) {
|
||||
len = UInt64(bufferLen-offset)
|
||||
}
|
||||
if receivedOpcode == .connectionClose && len > 0 {
|
||||
let size = MemoryLayout<UInt16>.size
|
||||
offset += size
|
||||
len -= UInt64(size)
|
||||
}
|
||||
let data = Data(bytes: baseAddress+offset, count: Int(len))
|
||||
|
||||
if receivedOpcode == .connectionClose {
|
||||
var closeReason = "connection closed by server"
|
||||
if let customCloseReason = String(data: data, encoding: .utf8) {
|
||||
closeReason = customCloseReason
|
||||
} else {
|
||||
closeCode = CloseCode.protocolError.rawValue
|
||||
}
|
||||
doDisconnect(errorWithDetail(closeReason, code: closeCode))
|
||||
writeError(closeCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
if receivedOpcode == .pong {
|
||||
if canDispatch {
|
||||
callbackQueue.async { [weak self] in
|
||||
guard let s = self else { return }
|
||||
let pongData: Data? = data.count > 0 ? data : nil
|
||||
s.onPong?(pongData)
|
||||
s.pongDelegate?.websocketDidReceivePong(socket: s, data: pongData)
|
||||
}
|
||||
}
|
||||
return buffer.fromOffset(offset + Int(len))
|
||||
}
|
||||
var response = readStack.last
|
||||
if isControlFrame {
|
||||
response = nil // Don't append pings.
|
||||
}
|
||||
if isFin == 0 && receivedOpcode == .continueFrame && response == nil {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("continue frame before a binary or text frame", code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
var isNew = false
|
||||
if response == nil {
|
||||
if receivedOpcode == .continueFrame {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("first frame can't be a continue frame",
|
||||
code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
isNew = true
|
||||
response = WSResponse()
|
||||
response!.code = receivedOpcode!
|
||||
response!.bytesLeft = Int(dataLength)
|
||||
response!.buffer = NSMutableData(data: data)
|
||||
} else {
|
||||
if receivedOpcode == .continueFrame {
|
||||
response!.bytesLeft = Int(dataLength)
|
||||
} else {
|
||||
let errCode = CloseCode.protocolError.rawValue
|
||||
doDisconnect(errorWithDetail("second and beyond of fragment message must be a continue frame",
|
||||
code: errCode))
|
||||
writeError(errCode)
|
||||
return emptyBuffer
|
||||
}
|
||||
response!.buffer!.append(data)
|
||||
}
|
||||
if let response = response {
|
||||
response.bytesLeft -= Int(len)
|
||||
response.frameCount += 1
|
||||
response.isFin = isFin > 0 ? true : false
|
||||
if isNew {
|
||||
readStack.append(response)
|
||||
}
|
||||
_ = processResponse(response)
|
||||
}
|
||||
|
||||
let step = Int(offset + numericCast(len))
|
||||
return buffer.fromOffset(step)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Process all messages in the buffer if possible.
|
||||
*/
|
||||
private func processRawMessagesInBuffer(_ pointer: UnsafePointer<UInt8>, bufferLen: Int) {
|
||||
var buffer = UnsafeBufferPointer(start: pointer, count: bufferLen)
|
||||
repeat {
|
||||
buffer = processOneRawMessage(inBuffer: buffer)
|
||||
} while buffer.count >= 2
|
||||
if buffer.count > 0 {
|
||||
fragBuffer = Data(buffer: buffer)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Process the finished response of a buffer.
|
||||
*/
|
||||
private func processResponse(_ response: WSResponse) -> Bool {
|
||||
if response.isFin && response.bytesLeft <= 0 {
|
||||
if response.code == .ping {
|
||||
let data = response.buffer! // local copy so it is perverse for writing
|
||||
dequeueWrite(data as Data, code: .pong)
|
||||
} else if response.code == .textFrame {
|
||||
let str: NSString? = NSString(data: response.buffer! as Data, encoding: String.Encoding.utf8.rawValue)
|
||||
if str == nil {
|
||||
writeError(CloseCode.encoding.rawValue)
|
||||
return false
|
||||
}
|
||||
if canDispatch {
|
||||
callbackQueue.async { [weak self] in
|
||||
guard let s = self else { return }
|
||||
s.onText?(str! as String)
|
||||
s.delegate?.websocketDidReceiveMessage(socket: s, text: str! as String)
|
||||
}
|
||||
}
|
||||
} else if response.code == .binaryFrame {
|
||||
if canDispatch {
|
||||
let data = response.buffer! // local copy so it is perverse for writing
|
||||
callbackQueue.async { [weak self] in
|
||||
guard let s = self else { return }
|
||||
s.onData?(data as Data)
|
||||
s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)
|
||||
}
|
||||
}
|
||||
}
|
||||
readStack.removeLast()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
Create an error
|
||||
*/
|
||||
private func errorWithDetail(_ detail: String, code: UInt16) -> NSError {
|
||||
var details = [String: String]()
|
||||
details[NSLocalizedDescriptionKey] = detail
|
||||
return NSError(domain: WebSocket.ErrorDomain, code: Int(code), userInfo: details)
|
||||
}
|
||||
|
||||
/**
|
||||
Write an error to the socket
|
||||
*/
|
||||
private func writeError(_ code: UInt16) {
|
||||
let buf = NSMutableData(capacity: MemoryLayout<UInt16>.size)
|
||||
let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)
|
||||
WebSocket.writeUint16(buffer, offset: 0, value: code)
|
||||
dequeueWrite(Data(bytes: buffer, count: MemoryLayout<UInt16>.size), code: .connectionClose)
|
||||
}
|
||||
|
||||
/**
|
||||
Used to write things to the stream
|
||||
*/
|
||||
private func dequeueWrite(_ data: Data, code: OpCode, writeCompletion: (() -> ())? = nil) {
|
||||
let operation = BlockOperation()
|
||||
operation.addExecutionBlock { [weak self, weak operation] in
|
||||
//stream isn't ready, let's wait
|
||||
guard let s = self else { return }
|
||||
guard let sOperation = operation else { return }
|
||||
var offset = 2
|
||||
let dataLength = data.count
|
||||
let frame = NSMutableData(capacity: dataLength + s.MaxFrameSize)
|
||||
let buffer = UnsafeMutableRawPointer(frame!.mutableBytes).assumingMemoryBound(to: UInt8.self)
|
||||
buffer[0] = s.FinMask | code.rawValue
|
||||
if dataLength < 126 {
|
||||
buffer[1] = CUnsignedChar(dataLength)
|
||||
} else if dataLength <= Int(UInt16.max) {
|
||||
buffer[1] = 126
|
||||
WebSocket.writeUint16(buffer, offset: offset, value: UInt16(dataLength))
|
||||
offset += MemoryLayout<UInt16>.size
|
||||
} else {
|
||||
buffer[1] = 127
|
||||
WebSocket.writeUint64(buffer, offset: offset, value: UInt64(dataLength))
|
||||
offset += MemoryLayout<UInt64>.size
|
||||
}
|
||||
buffer[1] |= s.MaskMask
|
||||
let maskKey = UnsafeMutablePointer<UInt8>(buffer + offset)
|
||||
_ = SecRandomCopyBytes(kSecRandomDefault, Int(MemoryLayout<UInt32>.size), maskKey)
|
||||
offset += MemoryLayout<UInt32>.size
|
||||
|
||||
for i in 0..<dataLength {
|
||||
buffer[offset] = data[i] ^ maskKey[i % MemoryLayout<UInt32>.size]
|
||||
offset += 1
|
||||
}
|
||||
var total = 0
|
||||
while !sOperation.isCancelled {
|
||||
guard let outStream = s.outputStream else { break }
|
||||
let writeBuffer = UnsafeRawPointer(frame!.bytes+total).assumingMemoryBound(to: UInt8.self)
|
||||
let len = outStream.write(writeBuffer, maxLength: offset-total)
|
||||
if len < 0 {
|
||||
var error: Error?
|
||||
if let streamError = outStream.streamError {
|
||||
error = streamError
|
||||
} else {
|
||||
let errCode = InternalErrorCode.outputStreamWriteError.rawValue
|
||||
error = s.errorWithDetail("output stream error during write", code: errCode)
|
||||
}
|
||||
s.doDisconnect(error as NSError?)
|
||||
break
|
||||
} else {
|
||||
total += len
|
||||
}
|
||||
if total >= offset {
|
||||
if let queue = self?.callbackQueue, let callback = writeCompletion {
|
||||
queue.async {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
writeQueue.addOperation(operation)
|
||||
}
|
||||
|
||||
/**
|
||||
Used to preform the disconnect delegate
|
||||
*/
|
||||
private func doDisconnect(_ error: NSError?) {
|
||||
guard !didDisconnect else { return }
|
||||
didDisconnect = true
|
||||
isConnecting = false
|
||||
connected = false
|
||||
guard canDispatch else {return}
|
||||
callbackQueue.async { [weak self] in
|
||||
guard let s = self else { return }
|
||||
s.onDisconnect?(error)
|
||||
s.delegate?.websocketDidDisconnect(socket: s, error: error)
|
||||
let userInfo = error.map{ [WebsocketDisconnectionErrorKeyName: $0] }
|
||||
s.notificationCenter.post(name: NSNotification.Name(WebsocketDidDisconnectNotification), object: self, userInfo: userInfo)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Deinit
|
||||
deinit {
|
||||
mutex.lock()
|
||||
readyToWrite = false
|
||||
mutex.unlock()
|
||||
cleanupStream()
|
||||
writeQueue.cancelAllOperations()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extension Data {
|
||||
|
||||
init(buffer: UnsafeBufferPointer<UInt8>) {
|
||||
self.init(bytes: buffer.baseAddress!, count: buffer.count)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extension UnsafeBufferPointer {
|
||||
|
||||
func fromOffset(_ offset: Int) -> UnsafeBufferPointer<Element> {
|
||||
return UnsafeBufferPointer<Element>(start: baseAddress?.advanced(by: offset), count: count - offset)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private let emptyBuffer = UnsafeBufferPointer<UInt8>(start: nil, count: 0)
|
||||
File renamed without changes.
+39
-42
@@ -12,7 +12,7 @@ import XCTest
|
||||
class SocketBasicPacketTest: XCTestCase {
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
|
||||
|
||||
func testEmpyEmit() {
|
||||
let expectedSendString = "2[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
@@ -20,75 +20,75 @@ class SocketBasicPacketTest: XCTestCase {
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testNullEmit() {
|
||||
let expectedSendString = "2[\"test\",null]"
|
||||
let sendData: [Any] = ["test", NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testStringEmit() {
|
||||
let expectedSendString = "2[\"test\",\"foo bar\"]"
|
||||
let sendData = ["test", "foo bar"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testStringEmitWithQuotes() {
|
||||
let expectedSendString = "2[\"test\",\"\\\"he\\\"llo world\\\"\"]"
|
||||
let sendData = ["test", "\"he\"llo world\""]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testJSONEmit() {
|
||||
let expectedSendString = "2[\"test\",{\"null\":null,\"hello\":1,\"test\":\"hello\",\"foobar\":true}]"
|
||||
let sendData: [Any] = ["test", ["foobar": true, "hello": 1, "test": "hello", "null": NSNull()]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testArrayEmit() {
|
||||
let expectedSendString = "2[\"test\",[\"hello\",1,{\"test\":\"test\"}]]"
|
||||
let sendData: [Any] = ["test", ["hello", 1, ["test": "test"]]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testBinaryEmit() {
|
||||
let expectedSendString = "51-[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
}
|
||||
|
||||
|
||||
func testMultipleBinaryEmit() {
|
||||
let expectedSendString = "52-[\"test\",{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData: [Any] = ["test", ["data1": data, "data2": data2] as NSDictionary]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: -1, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
}
|
||||
|
||||
|
||||
func testEmitWithAck() {
|
||||
let expectedSendString = "20[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: false)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString,
|
||||
|
||||
|
||||
expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testEmitDataWithAck() {
|
||||
let expectedSendString = "51-0[\"test\",{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData: [Any] = ["test", data]
|
||||
@@ -97,70 +97,67 @@ class SocketBasicPacketTest: XCTestCase {
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
}
|
||||
|
||||
|
||||
// Acks
|
||||
func testEmptyAck() {
|
||||
let expectedSendString = "30[]"
|
||||
let packet = SocketPacket.packetFromEmit([], id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testNullAck() {
|
||||
let expectedSendString = "30[null]"
|
||||
let sendData = [NSNull()]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testStringAck() {
|
||||
let expectedSendString = "30[\"test\"]"
|
||||
let sendData = ["test"]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testJSONAck() {
|
||||
let expectedSendString = "30[{\"null\":null,\"hello\":1,\"test\":\"hello\",\"foobar\":true}]"
|
||||
let sendData = [["foobar": true, "hello": 1, "test": "hello", "null": NSNull()]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
}
|
||||
|
||||
|
||||
func testBinaryAck() {
|
||||
let expectedSendString = "61-0[{\"_placeholder\":true,\"num\":0}]"
|
||||
let sendData = [data]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data])
|
||||
}
|
||||
|
||||
|
||||
func testMultipleBinaryAck() {
|
||||
let expectedSendString = "62-0[{\"data2\":{\"_placeholder\":true,\"num\":0},\"data1\":{\"_placeholder\":true,\"num\":1}}]"
|
||||
let sendData = [["data1": data, "data2": data2]]
|
||||
let packet = SocketPacket.packetFromEmit(sendData, id: 0, nsp: "/", ack: true)
|
||||
|
||||
|
||||
XCTAssertEqual(packet.packetString, expectedSendString)
|
||||
XCTAssertEqual(packet.binary, [data2, data])
|
||||
}
|
||||
|
||||
|
||||
func testBinaryStringPlaceholderInMessage() {
|
||||
let engineString = "52-[\"test\",\"~~0\",{\"num\":0,\"_placeholder\":true},{\"_placeholder\":true,\"num\":1}]"
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://localhost/")!)
|
||||
socket.setTestable()
|
||||
|
||||
if case let .right(packet) = socket.parseString(engineString) {
|
||||
var packet = packet
|
||||
XCTAssertEqual(packet.event, "test")
|
||||
_ = packet.addData(data)
|
||||
_ = packet.addData(data2)
|
||||
XCTAssertEqual(packet.args[0] as? String, "~~0")
|
||||
} else {
|
||||
XCTFail()
|
||||
}
|
||||
|
||||
var packet = try! socket.parseString(engineString)
|
||||
|
||||
XCTAssertEqual(packet.event, "test")
|
||||
_ = packet.addData(data)
|
||||
_ = packet.addData(data2)
|
||||
XCTAssertEqual(packet.args[0] as? String, "~~0")
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+32
-35
@@ -11,7 +11,7 @@ import XCTest
|
||||
|
||||
class SocketParserTest: XCTestCase {
|
||||
let testSocket = SocketIOClient(socketURL: URL(string: "http://localhost/")!)
|
||||
|
||||
|
||||
//Format key: message; namespace-data-binary-id
|
||||
static let packetTypes: [String: (String, [Any], [Data], Int)] = [
|
||||
"0": ("/", [], [], -1), "1": ("/", [], [], -1),
|
||||
@@ -29,7 +29,7 @@ class SocketParserTest: XCTestCase {
|
||||
"4{\"test\":2}": ("/", [["test": 2]], [], -1),
|
||||
"41": ("/", [1], [], -1),
|
||||
"4[1, \"hello\"]": ("/", [1, "hello"], [], -1)]
|
||||
|
||||
|
||||
func testDisconnect() {
|
||||
let message = "1"
|
||||
validateParseResult(message)
|
||||
@@ -39,82 +39,82 @@ class SocketParserTest: XCTestCase {
|
||||
let message = "0"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testDisconnectNameSpace() {
|
||||
let message = "1/swift"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testConnecttNameSpace() {
|
||||
let message = "0/swift"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testIdEvent() {
|
||||
let message = "25[\"test\"]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testBinaryPlaceholderAsString() {
|
||||
let message = "2[\"test\",\"~~0\"]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testNameSpaceArrayParse() {
|
||||
let message = "2/swift,[\"testArrayEmitReturn\",[\"test3\",\"test4\"]]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testNameSpaceArrayAckParse() {
|
||||
let message = "3/swift,0[[\"test3\",\"test4\"]]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testNameSpaceBinaryEventParse() {
|
||||
let message = "51-/swift,[\"testMultipleItemsWithBufferEmitReturn\",[1,2],{\"test\":\"bob\"},25,\"polo\",{\"_placeholder\":true,\"num\":0}]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testNameSpaceBinaryAckParse() {
|
||||
let message = "61-/swift,19[[1,2],{\"test\":\"bob\"},25,\"polo\",{\"_placeholder\":true,\"num\":0}]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testNamespaceErrorParse() {
|
||||
let message = "4/swift,"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testErrorTypeString() {
|
||||
let message = "4\"ERROR\""
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testErrorTypeDictionary() {
|
||||
let message = "4{\"test\":2}"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testErrorTypeInt() {
|
||||
let message = "41"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testErrorTypeArray() {
|
||||
let message = "4[1, \"hello\"]"
|
||||
validateParseResult(message)
|
||||
}
|
||||
|
||||
|
||||
func testInvalidInput() {
|
||||
let message = "8"
|
||||
switch testSocket.parseString(message) {
|
||||
case .left(_):
|
||||
return
|
||||
case .right(_):
|
||||
XCTFail("Created packet when shouldn't have")
|
||||
do {
|
||||
let _ = try testSocket.parseString(message)
|
||||
XCTFail()
|
||||
} catch {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func testGenericParser() {
|
||||
var parser = SocketStringReader(message: "61-/swift,")
|
||||
XCTAssertEqual(parser.read(count: 1), "6")
|
||||
@@ -122,27 +122,24 @@ class SocketParserTest: XCTestCase {
|
||||
XCTAssertEqual(parser.readUntilOccurence(of: "-"), "1")
|
||||
XCTAssertEqual(parser.currentCharacter, "/")
|
||||
}
|
||||
|
||||
|
||||
func validateParseResult(_ message: String) {
|
||||
let validValues = SocketParserTest.packetTypes[message]!
|
||||
let packet = testSocket.parseString(message)
|
||||
let packet = try! testSocket.parseString(message)
|
||||
let type = String(message.characters.prefix(1))
|
||||
if case let .right(packet) = packet {
|
||||
XCTAssertEqual(packet.type, SocketPacket.PacketType(rawValue: Int(type) ?? -1)!)
|
||||
XCTAssertEqual(packet.nsp, validValues.0)
|
||||
XCTAssertTrue((packet.data as NSArray).isEqual(to: validValues.1), "\(packet.data)")
|
||||
XCTAssertTrue((packet.binary as NSArray).isEqual(to: validValues.2), "\(packet.binary)")
|
||||
XCTAssertEqual(packet.id, validValues.3)
|
||||
} else {
|
||||
XCTFail()
|
||||
}
|
||||
|
||||
XCTAssertEqual(packet.type, SocketPacket.PacketType(rawValue: Int(type) ?? -1)!)
|
||||
XCTAssertEqual(packet.nsp, validValues.0)
|
||||
XCTAssertTrue((packet.data as NSArray).isEqual(to: validValues.1), "\(packet.data)")
|
||||
XCTAssertTrue((packet.binary as NSArray).isEqual(to: validValues.2), "\(packet.binary)")
|
||||
XCTAssertEqual(packet.id, validValues.3)
|
||||
}
|
||||
|
||||
|
||||
func testParsePerformance() {
|
||||
let keys = Array(SocketParserTest.packetTypes.keys)
|
||||
measure {
|
||||
for item in keys.enumerated() {
|
||||
_ = self.testSocket.parseString(item.element)
|
||||
_ = try! self.testSocket.parseString(item.element)
|
||||
}
|
||||
}
|
||||
}
|
||||
+161
-8
@@ -8,6 +8,7 @@
|
||||
|
||||
import XCTest
|
||||
@testable import SocketIO
|
||||
import Starscream
|
||||
|
||||
class SocketSideEffectTest: XCTestCase {
|
||||
func testInitialCurrentAck() {
|
||||
@@ -83,15 +84,41 @@ class SocketSideEffectTest: XCTestCase {
|
||||
waitForExpectations(timeout: 3, handler: nil)
|
||||
}
|
||||
|
||||
func testHandleOnceClientEvent() {
|
||||
let expect = expectation(description: "handled event")
|
||||
|
||||
socket.setTestStatus(.connecting)
|
||||
|
||||
socket.once(clientEvent: .connect) {data, ack in
|
||||
XCTAssertEqual(self.socket.testHandlers.count, 0)
|
||||
expect.fulfill()
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
|
||||
// Fake connecting
|
||||
self.socket.parseEngineMessage("0/")
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: 3, handler: nil)
|
||||
}
|
||||
|
||||
func testOffWithEvent() {
|
||||
socket.on("test") {data, ack in }
|
||||
XCTAssertEqual(socket.testHandlers.count, 1)
|
||||
socket.on("test") {data, ack in }
|
||||
XCTAssertEqual(socket.testHandlers.count, 2)
|
||||
socket.off("test")
|
||||
XCTAssertEqual(socket.testHandlers.count, 0)
|
||||
}
|
||||
|
||||
func testOffClientEvent() {
|
||||
socket.on(clientEvent: .connect) {data, ack in }
|
||||
socket.on(clientEvent: .disconnect) {data, ack in }
|
||||
XCTAssertEqual(socket.testHandlers.count, 2)
|
||||
socket.off(clientEvent: .disconnect)
|
||||
XCTAssertEqual(socket.testHandlers.count, 1)
|
||||
XCTAssertTrue(socket.testHandlers.contains(where: { $0.event == "connect" }))
|
||||
}
|
||||
|
||||
func testOffWithId() {
|
||||
let handler = socket.on("test") {data, ack in }
|
||||
XCTAssertEqual(socket.testHandlers.count, 1)
|
||||
@@ -225,32 +252,84 @@ class SocketSideEffectTest: XCTestCase {
|
||||
let expect = expectation(description: "The client should call the timeout function")
|
||||
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.nsp = "/someNamespace"
|
||||
socket.engine = TestEngine(client: socket, url: socket.socketURL, options: nil)
|
||||
|
||||
socket.connect(timeoutAfter: 1, withHandler: {
|
||||
socket.connect(timeoutAfter: 0.5, withHandler: {
|
||||
expect.fulfill()
|
||||
})
|
||||
|
||||
waitForExpectations(timeout: 2)
|
||||
waitForExpectations(timeout: 0.8)
|
||||
}
|
||||
|
||||
func testConnectDoesNotTimeOutIfConnected() {
|
||||
let expect = expectation(description: "The client should not call the timeout function")
|
||||
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.engine = TestEngine(client: socket, url: socket.socketURL, options: nil)
|
||||
|
||||
socket.connect(timeoutAfter: 1, withHandler: {
|
||||
socket.on(clientEvent: .connect) {data, ack in
|
||||
expect.fulfill()
|
||||
}
|
||||
|
||||
socket.connect(timeoutAfter: 0.5, withHandler: {
|
||||
XCTFail("Should not call timeout handler if status is connected")
|
||||
})
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.2) {
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
|
||||
// Fake connecting
|
||||
self.socket.setTestStatus(.connected)
|
||||
self.socket.parseEngineMessage("0/")
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.1) {
|
||||
waitForExpectations(timeout: 2)
|
||||
}
|
||||
|
||||
func testClientCallsConnectOnEngineOpen() {
|
||||
let expect = expectation(description: "The client call the connect handler")
|
||||
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.engine = TestEngine(client: socket, url: socket.socketURL, options: nil)
|
||||
|
||||
socket.on(clientEvent: .connect) {data, ack in
|
||||
expect.fulfill()
|
||||
}
|
||||
|
||||
socket.connect(timeoutAfter: 0.5, withHandler: {
|
||||
XCTFail("Should not call timeout handler if status is connected")
|
||||
})
|
||||
|
||||
waitForExpectations(timeout: 2)
|
||||
}
|
||||
|
||||
func testConnectIsCalledWithNamespace() {
|
||||
let expect = expectation(description: "The client should not call the timeout function")
|
||||
let nspString = "/swift"
|
||||
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.nsp = nspString
|
||||
socket.engine = TestEngine(client: socket, url: socket.socketURL, options: nil)
|
||||
|
||||
socket.on(clientEvent: .connect) {data, ack in
|
||||
guard let nsp = data[0] as? String else {
|
||||
XCTFail("Connect should be called with a namespace")
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(nspString, nsp, "It should connect with the correct namespace")
|
||||
|
||||
expect.fulfill()
|
||||
}
|
||||
|
||||
socket.connect(timeoutAfter: 0.3, withHandler: {
|
||||
XCTFail("Should not call timeout handler if status is connected")
|
||||
})
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
|
||||
// Fake connecting
|
||||
self.socket.parseEngineMessage("0/swift")
|
||||
}
|
||||
|
||||
waitForExpectations(timeout: 2)
|
||||
}
|
||||
|
||||
@@ -289,13 +368,50 @@ class SocketSideEffectTest: XCTestCase {
|
||||
expect.fulfill()
|
||||
}
|
||||
|
||||
socket.emitWithAck("myEvent", ThrowingData()).timingOut(after: 1, callback: {_ in
|
||||
socket.emitWithAck("myEvent", ThrowingData()).timingOut(after: 0.8, callback: {_ in
|
||||
XCTFail("Ack callback should not be called")
|
||||
})
|
||||
|
||||
waitForExpectations(timeout: 0.2)
|
||||
}
|
||||
|
||||
func testSettingConfigAfterInit() {
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.config.insert(.log(true))
|
||||
|
||||
XCTAssertTrue(DefaultSocketLogger.Logger.log, "It should set logging to true after creation")
|
||||
|
||||
socket.config = [.log(false), .nsp("/test")]
|
||||
|
||||
XCTAssertFalse(DefaultSocketLogger.Logger.log, "It should set logging to false after creation")
|
||||
XCTAssertEqual(socket.nsp, "/test", "It should set the namespace after creation")
|
||||
}
|
||||
|
||||
func testSettingExtraHeadersAfterInit() {
|
||||
socket.setTestStatus(.notConnected)
|
||||
socket.config = [.extraHeaders(["new": "value"])]
|
||||
socket.config.insert(.extraHeaders(["hello": "world"]), replacing: true)
|
||||
|
||||
for config in socket.config {
|
||||
switch config {
|
||||
case let .extraHeaders(headers):
|
||||
XCTAssertTrue(headers.keys.contains("hello"), "It should contain hello header key")
|
||||
XCTAssertFalse(headers.keys.contains("new"), "It should not contain old data")
|
||||
case .path:
|
||||
continue
|
||||
default:
|
||||
XCTFail("It should only have two configs")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testSettingConfigAfterInitWhenConnectedIgnoresChanges() {
|
||||
socket.config = [.log(true), .nsp("/test")]
|
||||
|
||||
XCTAssertFalse(DefaultSocketLogger.Logger.log, "It should set logging to false after creation")
|
||||
XCTAssertEqual(socket.nsp, "/", "It should set the namespace after creation")
|
||||
}
|
||||
|
||||
let data = "test".data(using: String.Encoding.utf8)!
|
||||
let data2 = "test2".data(using: String.Encoding.utf8)!
|
||||
private var socket: SocketIOClient!
|
||||
@@ -317,3 +433,40 @@ struct ThrowingData : SocketData {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestEngine : SocketEngineSpec {
|
||||
weak var client: SocketEngineClient?
|
||||
private(set) var closed = false
|
||||
private(set) var connected = false
|
||||
var connectParams: [String: Any]? = nil
|
||||
private(set) var cookies: [HTTPCookie]? = nil
|
||||
private(set) var engineQueue = DispatchQueue.main
|
||||
private(set) var extraHeaders: [String: String]? = nil
|
||||
private(set) var fastUpgrade = false
|
||||
private(set) var forcePolling = false
|
||||
private(set) var forceWebsockets = false
|
||||
private(set) var polling = false
|
||||
private(set) var probing = false
|
||||
private(set) var sid = ""
|
||||
private(set) var socketPath = ""
|
||||
private(set) var urlPolling = URL(string: "http://localhost/")!
|
||||
private(set) var urlWebSocket = URL(string: "http://localhost/")!
|
||||
private(set) var websocket = false
|
||||
private(set) var ws: WebSocket? = nil
|
||||
|
||||
required init(client: SocketEngineClient, url: URL, options: NSDictionary?) {
|
||||
self.client = client
|
||||
}
|
||||
|
||||
func connect() {
|
||||
client?.engineDidOpen(reason: "Connect")
|
||||
}
|
||||
|
||||
func didError(reason: String) { }
|
||||
func disconnect(reason: String) { }
|
||||
func doFastUpgrade() { }
|
||||
func flushWaitingForPostToWebSocket() { }
|
||||
func parseEngineData(_ data: Data) { }
|
||||
func parseEngineMessage(_ message: String) { }
|
||||
func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) { }
|
||||
}
|
||||
+9
-2
@@ -28,13 +28,15 @@
|
||||
|
||||
- (void)testProperties {
|
||||
NSURL* url = nil;
|
||||
|
||||
|
||||
url = self.socket.socketURL;
|
||||
self.socket.forceNew = false;
|
||||
self.socket.handleQueue = dispatch_get_main_queue();
|
||||
self.socket.nsp = @"/objective-c";
|
||||
self.socket.reconnects = false;
|
||||
self.socket.reconnectWait = 1;
|
||||
if (self.socket.status == SocketIOClientStatusConnected) { }
|
||||
if (self.socket.engine == NULL) { }
|
||||
}
|
||||
|
||||
- (void)testOnSyntax {
|
||||
@@ -67,7 +69,7 @@
|
||||
[self.socket onAny:^(SocketAnyEvent* any) {
|
||||
NSString* event = any.event;
|
||||
NSArray* data = any.items;
|
||||
|
||||
|
||||
[self.socket emit:event with:data];
|
||||
}];
|
||||
}
|
||||
@@ -98,4 +100,9 @@
|
||||
[manager removeSocketWithLabel:@"test"];
|
||||
}
|
||||
|
||||
- (void)testSSLSecurity {
|
||||
SSLSecurity* sec = [[SSLSecurity alloc] initWithUsePublicKeys:0];
|
||||
sec = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,54 @@
|
||||
## How do I connect to my WebSocket server?
|
||||
|
||||
This library is **NOT** a WebSockets library. This library is only for servers that implement the socket.io protocol,
|
||||
such as [socket.io](https://socket.io/). If you need a plain WebSockets client check out
|
||||
[Starscream](https://github.com/daltoniam/Starscream) for Swift and [JetFire](https://github.com/acmacalister/jetfire)
|
||||
for Objective-C.
|
||||
|
||||
## Why isn't my event handler being called?
|
||||
|
||||
One of the most common reasons your event might not be called is if the client is released by
|
||||
[ARC](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html).
|
||||
|
||||
Take this code for example:
|
||||
|
||||
```swift
|
||||
class SocketManager {
|
||||
func addHandlers() {
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://somesocketioserver.com")!)
|
||||
|
||||
socket.on("myEvent") {data, ack in
|
||||
print(data)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
This code is **incorrect**, and the event handler will never be called. Because as soon as this method is called `socket`
|
||||
will be released and its memory reclaimed.
|
||||
|
||||
A correct way would be:
|
||||
|
||||
```swift
|
||||
class SocketManager {
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://somesocketioserver.com")!)
|
||||
|
||||
func addHandlers() {
|
||||
socket.on("myEvent") {data, ack in
|
||||
print(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
------
|
||||
|
||||
Another case where this might happen is if you use namespaces in your socket.io application.
|
||||
|
||||
In the JavaScript client a url that looks like `http://somesocketioserver.com/client` would be done with the `nsp` config.
|
||||
|
||||
```swift
|
||||
let socket = SocketIOClient(socketURL: URL(string: "http://somesocketioserver.com")!, config: [.nsp("/client")])
|
||||
```
|
||||
+110
-150
@@ -22,7 +22,7 @@
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -43,15 +43,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -182,9 +176,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO12SocketEngine"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketEngine" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO12SocketEngine">SocketEngine</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine">SocketEngine</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -215,9 +209,9 @@ See <code><a href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO16SocketAckEmitter"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAckEmitter"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketAckEmitter" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO16SocketAckEmitter">SocketAckEmitter</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAckEmitter">SocketAckEmitter</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -245,9 +239,9 @@ See <code><a href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO13OnAckCallback"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)OnAckCallback"></a>
|
||||
<a name="//apple_ref/swift/Class/OnAckCallback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO13OnAckCallback">OnAckCallback</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)OnAckCallback">OnAckCallback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -283,111 +277,9 @@ Example:</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO14SocketIOClient"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketIOClient" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO14SocketIOClient">SocketIOClient</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The main class for SocketIOClientSwift.</p>
|
||||
|
||||
<p>Represents a socket.io-client. Most interaction with socket.io will be through this class.</p>
|
||||
|
||||
<a href="Classes/SocketIOClient.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SocketIOClient</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt">SocketIOClientSpec</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">,</span> <span class="kt">SocketParsable</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO9WebSocket"></a>
|
||||
<a name="//apple_ref/swift/Class/WebSocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO9WebSocket">WebSocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Classes/WebSocket.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO7SSLCert"></a>
|
||||
<a name="//apple_ref/swift/Class/SSLCert" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO7SSLCert">SSLCert</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Classes/SSLCert.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO11SSLSecurity"></a>
|
||||
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO11SSLSecurity">SSLSecurity</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Classes/SSLSecurity.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO14SocketAnyEvent"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAnyEvent"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketAnyEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO14SocketAnyEvent">SocketAnyEvent</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAnyEvent">SocketAnyEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -417,9 +309,77 @@ Example:</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:C8SocketIO19SocketClientManager"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketIOClient"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketIOClient" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketIOClient">SocketIOClient</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The main class for SocketIOClientSwift.</p>
|
||||
|
||||
<p><strong>NOTE</strong>: The client is not thread/queue safe, all interaction with the socket should be done on the <code>handleQueue</code></p>
|
||||
|
||||
<p>Represents a socket.io-client. Most interaction with socket.io will be through this class.</p>
|
||||
|
||||
<a href="Classes/SocketIOClient.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SocketIOClient</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/SocketParsable.html">SocketParsable</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SSLSecurity"></a>
|
||||
<a name="//apple_ref/swift/Class/SSLSecurity" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SSLSecurity">SSLSecurity</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A wrapper around Starscream’s SSLSecurity that provides a minimal Objective-C interface.</p>
|
||||
|
||||
<a href="Classes/SSLSecurity.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SSLSecurity</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager"></a>
|
||||
<a name="//apple_ref/swift/Class/SocketClientManager" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:C8SocketIO19SocketClientManager">SocketClientManager</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager">SocketClientManager</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -465,8 +425,8 @@ manager["room1"]?.emit("hello")
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -202,9 +196,9 @@ Example:</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO13OnAckCallback9timingOutFT5afterSi8callbackFGSaP__T__T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)OnAckCallback(im)timingOutAfter:callback:"></a>
|
||||
<a name="//apple_ref/swift/Method/timingOut(after:callback:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO13OnAckCallback9timingOutFT5afterSi8callbackFGSaP__T__T_">timingOut(after:callback:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)OnAckCallback(im)timingOutAfter:callback:">timingOut(after:callback:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -219,7 +213,7 @@ Example:</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">timingOut</span><span class="p">(</span><span class="n">after</span> <span class="nv">seconds</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="kt"><a href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a></span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">timingOut</span><span class="p">(</span><span class="n">after</span> <span class="nv">seconds</span><span class="p">:</span> <span class="kt">Double</span><span class="p">,</span> <span class="nv">callback</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="kt"><a href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,7 +242,7 @@ Example:</p>
|
||||
<td>
|
||||
<div>
|
||||
<p>The callback called when an ack is received, or when a timeout happens.
|
||||
To check for timeout, use <code>SocketAckStatus</code>‘s <code>noAck</code> case.</p>
|
||||
To check for timeout, use <code><a href="../Enums/SocketAckStatus.html">SocketAckStatus</a></code>‘s <code>noAck</code> case.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -266,8 +260,8 @@ Example:</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -171,7 +165,13 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SSLSecurity</h1>
|
||||
<p>Undocumented</p>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">class</span> <span class="kt">SSLSecurity</span> <span class="p">:</span> <span class="kt">NSObject</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>A wrapper around Starscream’s SSLSecurity that provides a minimal Objective-C interface.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -183,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO11SSLSecurity11validatedDNSb"></a>
|
||||
<a name="//apple_ref/swift/Property/validatedDN" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO11SSLSecurity11validatedDNSb">validatedDN</a>
|
||||
<a name="/s:8SocketIO11SSLSecurityC8security10StarscreamABCv"></a>
|
||||
<a name="//apple_ref/swift/Property/security" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC8security10StarscreamABCv">security</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -193,18 +193,26 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>The internal Starscream SSLSecurity.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">security</span><span class="p">:</span> <span class="kt">Starscream</span><span class="o">.</span><span class="kt">SSLSecurity</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO11SSLSecuritycFT13usePublicKeysSb_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SSLSecurity(im)initWithUsePublicKeys:"></a>
|
||||
<a name="//apple_ref/swift/Method/init(usePublicKeys:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO11SSLSecuritycFT13usePublicKeysSb_S0_">init(usePublicKeys:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SSLSecurity(im)initWithUsePublicKeys:">init(usePublicKeys:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -212,14 +220,15 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Use certs from main app bundle</p>
|
||||
<p>Creates a new SSLSecurity that specifies whether to use publicKeys or certificates should be used for SSL
|
||||
pinning validation</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -235,26 +244,23 @@
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is to specific if the publicKeys or certificates should be used for SSL pinning validation</p>
|
||||
<p>is to specific if the publicKeys or certificates should be used for SSL pinning
|
||||
validation</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>a representation security object to be used with</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO11SSLSecuritycFT5certsGSaCS_7SSLCert_13usePublicKeysSb_S0_"></a>
|
||||
<a name="/s:8SocketIO11SSLSecurityCACSay10Starscream7SSLCertCG5certs_Sb13usePublicKeystcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(certs:usePublicKeys:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO11SSLSecuritycFT5certsGSaCS_7SSLCert_13usePublicKeysSb_S0_">init(certs:usePublicKeys:)</a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityCACSay10Starscream7SSLCertCG5certs_Sb13usePublicKeystcfc">init(certs:usePublicKeys:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -269,7 +275,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">certs</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SSLCert.html">SSLCert</a></span><span class="p">],</span> <span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">certs</span><span class="p">:</span> <span class="p">[</span><span class="kt">SSLCert</span><span class="p">],</span> <span class="nv">usePublicKeys</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -297,7 +303,8 @@
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is to specific if the publicKeys or certificates should be used for SSL pinning validation</p>
|
||||
<p>is to specific if the publicKeys or certificates should be used for SSL pinning
|
||||
validation</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -314,9 +321,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO11SSLSecurity7isValidFTCSo8SecTrust6domainGSqSS__Sb"></a>
|
||||
<a name="/s:8SocketIO11SSLSecurityC7isValidSbSo8SecTrustC_SSSg6domaintF"></a>
|
||||
<a name="//apple_ref/swift/Method/isValid(_:domain:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO11SSLSecurity7isValidFTCSo8SecTrust6domainGSqSS__Sb">isValid(_:domain:)</a>
|
||||
<a class="token" href="#/s:8SocketIO11SSLSecurityC7isValidSbSo8SecTrustC_SSSg6domaintF">isValid(_:domain:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -324,7 +331,7 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Valid the trust and domain name.</p>
|
||||
<p>Returns whether or not the given trust is valid.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -347,7 +354,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is the serverTrust to validate</p>
|
||||
<p>The trust to validate.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -359,7 +366,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is the CN domain to validate</p>
|
||||
<p>The CN domain to validate.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -368,7 +375,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>if the key was successfully validated</p>
|
||||
<p>Whether or not this is valid.</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -381,8 +388,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -198,9 +192,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO16SocketAckEmitter8expectedSb"></a>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC8expectedSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/expected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO16SocketAckEmitter8expectedSb">expected</a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC8expectedSbv">expected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -224,6 +218,75 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Initializers"></a>
|
||||
<a name="//apple_ref/swift/Section/Initializers" class="dashAnchor"></a>
|
||||
<a href="#/Initializers">
|
||||
<h3 class="section-name">Initializers</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A10AckEmitterCAcA0A8IOClientC6socket_Si6ackNumtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(socket:ackNum:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterCAcA0A8IOClientC6socket_Si6ackNumtcfc">init(socket:ackNum:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Creates a new <code>SocketAckEmitter</code>.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">,</span> <span class="nv">ackNum</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>socket</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The socket for this emitter.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>ackNum</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The ack number for this emitter.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Methods"></a>
|
||||
@@ -236,9 +299,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO16SocketAckEmitter4withFtGSaPS_10SocketData___T_"></a>
|
||||
<a name="/s:8SocketIO0A10AckEmitterC4withySayAA0A4Data_pGd_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO16SocketAckEmitter4withFtGSaPS_10SocketData___T_">with(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A10AckEmitterC4withySayAA0A4Data_pGd_tF">with(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -248,7 +311,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:FO8SocketIO17SocketClientEvent5errorFMS0_S0_">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:8SocketIO0A11ClientEventO5errorA2CmF">SocketClientEvent.error</a></code>
|
||||
will be emitted. The structure of the error data is <code>[ackNum, items, theError]</code></p>
|
||||
|
||||
</div>
|
||||
@@ -285,9 +348,9 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO16SocketAckEmitter4withFGSaP__T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAckEmitter(im)with:"></a>
|
||||
<a name="//apple_ref/swift/Method/with(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO16SocketAckEmitter4withFGSaP__T_">with(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAckEmitter(im)with:">with(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -336,8 +399,8 @@ will be emitted. The structure of the error data is <code>[ackNum, items, theErr
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -196,9 +190,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO14SocketAnyEvent5eventSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)event"></a>
|
||||
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent5eventSS">event</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)event">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -223,9 +217,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO14SocketAnyEvent5itemsGSqGSaP___"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)items"></a>
|
||||
<a name="//apple_ref/swift/Property/items" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent5itemsGSqGSaP___">items</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)items">items</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -250,9 +244,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO14SocketAnyEvent11descriptionSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)description"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO14SocketAnyEvent11descriptionSS">description</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketAnyEvent(py)description">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -282,8 +276,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -211,9 +205,36 @@ manager["room1"]?.emit("hello")
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:iC8SocketIO19SocketClientManager9subscriptFSSGSqCS_14SocketIOClient_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager(cpy)sharedManager"></a>
|
||||
<a name="//apple_ref/swift/Variable/sharedManager" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager(cpy)sharedManager">sharedManager</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The shared manager.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">sharedManager</span> <span class="o">=</span> <span class="kt">SocketClientManager</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A13ClientManagerC9subscriptAA0A8IOClientCSgSSci"></a>
|
||||
<a name="//apple_ref/swift/Method/subscript(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:iC8SocketIO19SocketClientManager9subscriptFSSGSqCS_14SocketIOClient_">subscript(_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ClientManagerC9subscriptAA0A8IOClientCSgSSci">subscript(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -239,33 +260,6 @@ manager["room1"]?.emit("hello")
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:ZvC8SocketIO19SocketClientManager13sharedManagerS0_"></a>
|
||||
<a name="//apple_ref/swift/Variable/sharedManager" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:ZvC8SocketIO19SocketClientManager13sharedManagerS0_">sharedManager</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The shared manager.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">sharedManager</span> <span class="o">=</span> <span class="kt">SocketClientManager</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
@@ -280,9 +274,9 @@ manager["room1"]?.emit("hello")
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO19SocketClientManager9addSocketFTCS_14SocketIOClient9labeledAsSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager(im)addSocket:labeledAs:"></a>
|
||||
<a name="//apple_ref/swift/Method/addSocket(_:labeledAs:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO19SocketClientManager9addSocketFTCS_14SocketIOClient9labeledAsSS_T_">addSocket(_:labeledAs:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager(im)addSocket:labeledAs:">addSocket(_:labeledAs:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -338,9 +332,9 @@ manager["room1"]?.emit("hello")
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO19SocketClientManager12removeSocketFT9withLabelSS_GSqCS_14SocketIOClient_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSocketWithLabel:"></a>
|
||||
<a name="//apple_ref/swift/Method/removeSocket(withLabel:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO19SocketClientManager12removeSocketFT9withLabelSS_GSqCS_14SocketIOClient_">removeSocket(withLabel:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSocketWithLabel:">removeSocket(withLabel:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -388,9 +382,9 @@ manager["room1"]?.emit("hello")
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO19SocketClientManager12removeSocketFCS_14SocketIOClientGSqS1__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSocket:"></a>
|
||||
<a name="//apple_ref/swift/Method/removeSocket(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO19SocketClientManager12removeSocketFCS_14SocketIOClientGSqS1__">removeSocket(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSocket:">removeSocket(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -438,9 +432,9 @@ manager["room1"]?.emit("hello")
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO19SocketClientManager13removeSocketsFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSockets"></a>
|
||||
<a name="//apple_ref/swift/Method/removeSockets()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO19SocketClientManager13removeSocketsFT_T_">removeSockets()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketClientManager(im)removeSockets">removeSockets()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -470,8 +464,8 @@ manager["room1"]?.emit("hello")
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+134
-113
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -197,9 +191,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine11engineQueueCSo13DispatchQueue"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)engineQueue"></a>
|
||||
<a name="//apple_ref/swift/Property/engineQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine11engineQueueCSo13DispatchQueue">engineQueue</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)engineQueue">engineQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -224,9 +218,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine13connectParamsGSqGVs10DictionarySSP___"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)connectParams"></a>
|
||||
<a name="//apple_ref/swift/Property/connectParams" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine13connectParamsGSqGVs10DictionarySSP___">connectParams</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)connectParams">connectParams</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -251,9 +245,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine8postWaitGSaSS_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC8postWaitSaySSGv"></a>
|
||||
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine8postWaitGSaSS_">postWait</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC8postWaitSaySSGv">postWait</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -280,9 +274,9 @@ See <code><a href="../Protocols/SocketEnginePollable.html">SocketEnginePollable<
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine14waitingForPollSb"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPollSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPoll" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine14waitingForPollSb">waitingForPoll</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPollSbv">waitingForPoll</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -310,9 +304,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine14waitingForPostSb"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC14waitingForPostSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPost" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine14waitingForPostSb">waitingForPost</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC14waitingForPostSbv">waitingForPost</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -340,9 +334,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine6closedSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)closed"></a>
|
||||
<a name="//apple_ref/swift/Property/closed" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine6closedSb">closed</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)closed">closed</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -367,9 +361,36 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine9connectedSb"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC8compressSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/compress" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC8compressSbv">compress</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>If <code>true</code> the engine will attempt to use WebSocket compression.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">compress</span> <span class="o">=</span> <span class="kc">false</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)connected"></a>
|
||||
<a name="//apple_ref/swift/Property/connected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine9connectedSb">connected</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)connected">connected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -394,9 +415,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine7cookiesGSqGSaCSo10HTTPCookie__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)cookies"></a>
|
||||
<a name="//apple_ref/swift/Property/cookies" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine7cookiesGSqGSaCSo10HTTPCookie__">cookies</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)cookies">cookies</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -421,9 +442,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine12extraHeadersGSqGVs10DictionarySSSS__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)extraHeaders"></a>
|
||||
<a name="//apple_ref/swift/Property/extraHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine12extraHeadersGSqGVs10DictionarySSSS__">extraHeaders</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)extraHeaders">extraHeaders</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -448,9 +469,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine11fastUpgradeSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)fastUpgrade"></a>
|
||||
<a name="//apple_ref/swift/Property/fastUpgrade" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine11fastUpgradeSb">fastUpgrade</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)fastUpgrade">fastUpgrade</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -477,9 +498,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine12forcePollingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)forcePolling"></a>
|
||||
<a name="//apple_ref/swift/Property/forcePolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine12forcePollingSb">forcePolling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)forcePolling">forcePolling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -504,9 +525,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine15forceWebsocketsSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)forceWebsockets"></a>
|
||||
<a name="//apple_ref/swift/Property/forceWebsockets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine15forceWebsocketsSb">forceWebsockets</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)forceWebsockets">forceWebsockets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -531,9 +552,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine11invalidatedSb"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC11invalidatedSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/invalidated" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine11invalidatedSb">invalidated</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC11invalidatedSbv">invalidated</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -558,9 +579,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine7pollingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)polling"></a>
|
||||
<a name="//apple_ref/swift/Property/polling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine7pollingSb">polling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)polling">polling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -585,9 +606,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine7probingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)probing"></a>
|
||||
<a name="//apple_ref/swift/Property/probing" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine7probingSb">probing</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)probing">probing</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -612,9 +633,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine7sessionGSqCSo10URLSession_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgv"></a>
|
||||
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine7sessionGSqCSo10URLSession_">session</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC7sessionSo10URLSessionCSgv">session</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -639,9 +660,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine3sidSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)sid"></a>
|
||||
<a name="//apple_ref/swift/Property/sid" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine3sidSS">sid</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)sid">sid</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -666,9 +687,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine10socketPathSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)socketPath"></a>
|
||||
<a name="//apple_ref/swift/Property/socketPath" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine10socketPathSS">socketPath</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)socketPath">socketPath</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -693,9 +714,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine10urlPollingV10Foundation3URL"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)urlPolling"></a>
|
||||
<a name="//apple_ref/swift/Property/urlPolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine10urlPollingV10Foundation3URL">urlPolling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)urlPolling">urlPolling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -720,9 +741,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine12urlWebSocketV10Foundation3URL"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)urlWebSocket"></a>
|
||||
<a name="//apple_ref/swift/Property/urlWebSocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine12urlWebSocketV10Foundation3URL">urlWebSocket</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)urlWebSocket">urlWebSocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -747,9 +768,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine9websocketSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)websocket"></a>
|
||||
<a name="//apple_ref/swift/Property/websocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine9websocketSb">websocket</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)websocket">websocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -774,9 +795,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine2wsGSqCS_9WebSocket_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)ws"></a>
|
||||
<a name="//apple_ref/swift/Property/ws" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine2wsGSqCS_9WebSocket_">ws</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)ws">ws</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -791,7 +812,7 @@ disconnect us.</p>
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><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"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight"><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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -801,9 +822,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO12SocketEngine6clientXwGSqPS_18SocketEngineClient__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(py)client"></a>
|
||||
<a name="//apple_ref/swift/Property/client" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO12SocketEngine6clientXwGSqPS_18SocketEngineClient__">client</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(py)client">client</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -839,9 +860,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEnginecFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL6configVS_27SocketIOClientConfiguration_S0_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineCAcA0aC6Client_p6client_10Foundation3URLV3urlAA0A21IOClientConfigurationV6configtcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(client:url:config:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEnginecFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL6configVS_27SocketIOClientConfiguration_S0_">init(client:url:config:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineCAcA0aC6Client_p6client_10Foundation3URLV3urlAA0A21IOClientConfigurationV6configtcfc">init(client:url:config:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -909,9 +930,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEnginecFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL7optionsGSqCSo12NSDictionary__S0_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)initWithClient:url:options:"></a>
|
||||
<a name="//apple_ref/swift/Method/init(client:url:options:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEnginecFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL7optionsGSqCSo12NSDictionary__S0_">init(client:url:options:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)initWithClient:url:options:">init(client:url:options:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -990,9 +1011,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine7connectFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)connect"></a>
|
||||
<a name="//apple_ref/swift/Method/connect()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine7connectFT_T_">connect()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)connect">connect()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1017,9 +1038,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine8didErrorFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)didErrorWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/didError(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine8didErrorFT6reasonSS_T_">didError(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)didErrorWithReason:">didError(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1044,9 +1065,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine10disconnectFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)disconnectWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/disconnect(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine10disconnectFT6reasonSS_T_">disconnect(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)disconnectWithReason:">disconnect(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1090,9 +1111,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine13doFastUpgradeFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)doFastUpgrade"></a>
|
||||
<a name="//apple_ref/swift/Method/doFastUpgrade()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine13doFastUpgradeFT_T_">doFastUpgrade()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)doFastUpgrade">doFastUpgrade()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1120,9 +1141,9 @@ WebSocket mode.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine30flushWaitingForPostToWebSocketFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)flushWaitingForPostToWebSocket"></a>
|
||||
<a name="//apple_ref/swift/Method/flushWaitingForPostToWebSocket()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine30flushWaitingForPostToWebSocketFT_T_">flushWaitingForPostToWebSocket()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)flushWaitingForPostToWebSocket">flushWaitingForPostToWebSocket()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1150,9 +1171,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine15parseEngineDataFV10Foundation4DataT_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)parseEngineData:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineData(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine15parseEngineDataFV10Foundation4DataT_">parseEngineData(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)parseEngineData:">parseEngineData(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1196,9 +1217,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine18parseEngineMessageFSST_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(cs)SocketEngine(im)parseEngineMessage:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineMessage(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine18parseEngineMessageFSST_">parseEngineMessage(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)parseEngineMessage:">parseEngineMessage(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1255,9 +1276,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine5writeFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||
<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="#/s:FC8SocketIO12SocketEngine5writeFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">write(_:withType:withData:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(cs)SocketEngine(im)write:withType:withData:">write(_:withType:withData:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1336,9 +1357,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine19websocketDidConnectFT6socketCS_9WebSocket_T_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC19websocketDidConnecty10Starscream03WebA0C6socket_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidConnect(socket:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine19websocketDidConnectFT6socketCS_9WebSocket_T_">websocketDidConnect(socket:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC19websocketDidConnecty10Starscream03WebA0C6socket_tF">websocketDidConnect(socket:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1353,7 +1374,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"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidConnect</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidConnect</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1363,9 +1384,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC22websocketDidDisconnecty10Starscream03WebA0C6socket_So7NSErrorCSg5errortF"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidDisconnect(socket:error:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_">websocketDidDisconnect(socket:error:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC22websocketDidDisconnecty10Starscream03WebA0C6socket_So7NSErrorCSg5errortF">websocketDidDisconnect(socket:error:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1380,7 +1401,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"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidDisconnect</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">,</span> <span class="nv">error</span><span class="p">:</span> <span class="kt">NSError</span><span class="p">?)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidDisconnect</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">,</span> <span class="nv">error</span><span class="p">:</span> <span class="kt">NSError</span><span class="p">?)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -1401,9 +1422,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO12SocketEngine10URLSessionFT7sessionCSo10URLSession25didBecomeInvalidWithErrorGSqCSo7NSError__T_"></a>
|
||||
<a name="/s:8SocketIO0A6EngineC10URLSessionySoADC7session_So7NSErrorCSg25didBecomeInvalidWithErrortF"></a>
|
||||
<a name="//apple_ref/swift/Method/URLSession(session:didBecomeInvalidWithError:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO12SocketEngine10URLSessionFT7sessionCSo10URLSession25didBecomeInvalidWithErrorGSqCSo7NSError__T_">URLSession(session:didBecomeInvalidWithError:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6EngineC10URLSessionySoADC7session_So7NSErrorCSg25didBecomeInvalidWithErrortF">URLSession(session:didBecomeInvalidWithError:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1433,8 +1454,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+679
-206
File diff suppressed because it is too large.
Load diff
@@ -1,914 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>WebSocket Class Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Class/WebSocket" class="dashAnchor"></a>
|
||||
|
||||
<a title="WebSocket Class Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
WebSocket Class Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>WebSocket</h1>
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:OC8SocketIO9WebSocket9CloseCode"></a>
|
||||
<a name="//apple_ref/swift/Enum/CloseCode" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:OC8SocketIO9WebSocket9CloseCode">CloseCode</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="../Classes/WebSocket/CloseCode.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:ZvC8SocketIO9WebSocket11ErrorDomainSS"></a>
|
||||
<a name="//apple_ref/swift/Variable/ErrorDomain" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:ZvC8SocketIO9WebSocket11ErrorDomainSS">ErrorDomain</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket13callbackQueueCSo13DispatchQueue"></a>
|
||||
<a name="//apple_ref/swift/Property/callbackQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket13callbackQueueCSo13DispatchQueue">callbackQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Delegates"></a>
|
||||
<a name="//apple_ref/swift/Section/Delegates" class="dashAnchor"></a>
|
||||
<a href="#/Delegates">
|
||||
<h3 class="section-name">Delegates</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket8delegateXwGSqPS_17WebSocketDelegate__"></a>
|
||||
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket8delegateXwGSqPS_17WebSocketDelegate__">delegate</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Responds to callback about new messages coming in over the WebSocket
|
||||
and also connection/disconnect messages.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket12pongDelegateXwGSqPS_21WebSocketPongDelegate__"></a>
|
||||
<a name="//apple_ref/swift/Property/pongDelegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket12pongDelegateXwGSqPS_21WebSocketPongDelegate__">pongDelegate</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Receives a callback for each pong message recived.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">pongDelegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Block%20based%20API."></a>
|
||||
<a name="//apple_ref/swift/Section/Block based API." class="dashAnchor"></a>
|
||||
<a href="#/Block%20based%20API.">
|
||||
<h3 class="section-name">Block based API.</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket9onConnectGSqFT_T__"></a>
|
||||
<a name="//apple_ref/swift/Property/onConnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket9onConnectGSqFT_T__">onConnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket12onDisconnectGSqFGSqCSo7NSError_T__"></a>
|
||||
<a name="//apple_ref/swift/Property/onDisconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket12onDisconnectGSqFGSqCSo7NSError_T__">onDisconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket6onTextGSqFSST__"></a>
|
||||
<a name="//apple_ref/swift/Property/onText" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket6onTextGSqFSST__">onText</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket6onDataGSqFV10Foundation4DataT__"></a>
|
||||
<a name="//apple_ref/swift/Property/onData" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket6onDataGSqFV10Foundation4DataT__">onData</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket6onPongGSqFGSqV10Foundation4Data_T__"></a>
|
||||
<a name="//apple_ref/swift/Property/onPong" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket6onPongGSqFGSqV10Foundation4Data_T__">onPong</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket7headersGVs10DictionarySSSS_"></a>
|
||||
<a name="//apple_ref/swift/Property/headers" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket7headersGVs10DictionarySSSS_">headers</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket11voipEnabledSb"></a>
|
||||
<a name="//apple_ref/swift/Property/voipEnabled" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket11voipEnabledSb">voipEnabled</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket24disableSSLCertValidationSb"></a>
|
||||
<a name="//apple_ref/swift/Property/disableSSLCertValidation" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket24disableSSLCertValidationSb">disableSSLCertValidation</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket8securityGSqPS_17SSLTrustValidator__"></a>
|
||||
<a name="//apple_ref/swift/Property/security" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket8securityGSqPS_17SSLTrustValidator__">security</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket22enabledSSLCipherSuitesGSqGSaVs6UInt32__"></a>
|
||||
<a name="//apple_ref/swift/Property/enabledSSLCipherSuites" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket22enabledSSLCipherSuitesGSqGSaVs6UInt32__">enabledSSLCipherSuites</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket6originGSqSS_"></a>
|
||||
<a name="//apple_ref/swift/Property/origin" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket6originGSqSS_">origin</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket7timeoutSi"></a>
|
||||
<a name="//apple_ref/swift/Property/timeout" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket7timeoutSi">timeout</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket11isConnectedSb"></a>
|
||||
<a name="//apple_ref/swift/Property/isConnected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket11isConnectedSb">isConnected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vC8SocketIO9WebSocket10currentURLV10Foundation3URL"></a>
|
||||
<a name="//apple_ref/swift/Property/currentURL" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vC8SocketIO9WebSocket10currentURLV10Foundation3URL">currentURL</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Private"></a>
|
||||
<a name="//apple_ref/swift/Section/Private" class="dashAnchor"></a>
|
||||
<a href="#/Private">
|
||||
<h3 class="section-name">Private</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL9protocolsGSqGSaSS___S0_"></a>
|
||||
<a name="//apple_ref/swift/Method/init(url:protocols:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL9protocolsGSqGSaSS___S0_">init(url:protocols:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Used for setting protocols.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">protocols</span><span class="p">:</span> <span class="p">[</span><span class="kt">String</span><span class="p">]?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL13writeQueueQOSOSC16QualityOfService9protocolsGSqGSaSS___S0_"></a>
|
||||
<a name="//apple_ref/swift/Method/init(url:writeQueueQOS:protocols:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocketcFT3urlV10Foundation3URL13writeQueueQOSOSC16QualityOfService9protocolsGSqGSaSS___S0_">init(url:writeQueueQOS:protocols:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket7connectFT_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/connect()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket7connectFT_T_">connect()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Connect to the WebSocket server on a background thread.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">connect</span><span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket10disconnectFT12forceTimeoutGSqSd_9closeCodeVs6UInt16_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/disconnect(forceTimeout:closeCode:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket10disconnectFT12forceTimeoutGSqSd_9closeCodeVs6UInt16_T_">disconnect(forceTimeout:closeCode:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.
|
||||
If you supply a non-nil <code>forceTimeout</code>, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.
|
||||
If you supply a zero (or negative) <code>forceTimeout</code>, I immediately close the socket (without sending a Close control frame) and notify my delegate.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">disconnect</span><span class="p">(</span><span class="nv">forceTimeout</span><span class="p">:</span> <span class="kt">TimeInterval</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">closeCode</span><span class="p">:</span> <span class="kt">UInt16</span> <span class="o">=</span> <span class="kt"><a href="../Classes/WebSocket/CloseCode.html">CloseCode</a></span><span class="o">.</span><span class="n">normal</span><span class="o">.</span><span class="n">rawValue</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>forceTimeout</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>Maximum time to wait for the server to close the socket.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>closeCode</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket5writeFT6stringSS10completionGSqFT_T___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/write(string:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT6stringSS10completionGSqFT_T___T_">write(string:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Write a string to the websocket. This sends it as a text frame.
|
||||
If you supply a non-nil completion block, I will perform it when the write completes.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>string</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The string to write.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The (optional) completion handler.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket5writeFT4dataV10Foundation4Data10completionGSqFT_T___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/write(data:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT4dataV10Foundation4Data10completionGSqFT_T___T_">write(data:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Write binary data to the websocket. This sends it as a binary frame.
|
||||
If you supply a non-nil completion block, I will perform it when the write completes.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>data</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The data to write.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>completion</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The (optional) completion handler.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket5writeFT4pingV10Foundation4Data10completionGSqFT_T___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/write(ping:completion:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket5writeFT4pingV10Foundation4Data10completionGSqFT_T___T_">write(ping:completion:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Write a ping to the websocket. This sends it as a control frame.
|
||||
Yodel a sound to the planet. This sends it as an astroid. <a href="http://youtu.be/Eu5ZJELRiJ8?t=42s">http://youtu.be/Eu5ZJELRiJ8?t=42s</a></p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">write</span><span class="p">(</span><span class="nv">ping</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="p">())?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO9WebSocket6streamFTCSo6Stream6handleVS1_5Event_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/stream(_:handle:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO9WebSocket6streamFTCSo6Stream6handleVS1_5Event_T_">stream(_:handle:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Delegate for the stream methods. Processes incoming bytes</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="n">open</span> <span class="kd">func</span> <span class="nf">stream</span><span class="p">(</span><span class="n">_</span> <span class="nv">aStream</span><span class="p">:</span> <span class="kt">Stream</span><span class="p">,</span> <span class="n">handle</span> <span class="nv">eventCode</span><span class="p">:</span> <span class="kt">Stream</span><span class="o">.</span><span class="kt">Event</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+169
-143
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Enums Reference</title>
|
||||
<title>Enumerations Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -15,14 +15,14 @@
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Enums Reference"></a>
|
||||
<a title="Enumerations Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -37,21 +37,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Enums Reference
|
||||
Enumerations Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -169,8 +163,8 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>Enums</h1>
|
||||
<p>The following enums are available globally.</p>
|
||||
<h1>Enumerations</h1>
|
||||
<p>The following enumerations are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -182,105 +176,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:O8SocketIO17SocketClientEvent"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketClientEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:O8SocketIO17SocketClientEvent">SocketClientEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The set of events that are generated by the client.</p>
|
||||
|
||||
<a href="Enums/SocketClientEvent.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketClientEvent</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:O8SocketIO20SocketIOClientStatus"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketIOClientStatus" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:O8SocketIO20SocketIOClientStatus">SocketIOClientStatus</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Represents the state of the client.</p>
|
||||
|
||||
<a href="Enums/SocketIOClientStatus.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientStatus</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:O8SocketIO15SocketAckStatus"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketAckStatus" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:O8SocketIO15SocketAckStatus">SocketAckStatus</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The status of an ack.</p>
|
||||
|
||||
<a href="Enums/SocketAckStatus.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketAckStatus</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:O8SocketIO22SocketEnginePacketType"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:O8SocketIO22SocketEnginePacketType">SocketEnginePacketType</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType">SocketEnginePacketType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -310,9 +208,73 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:O8SocketIO20SocketIOClientOption"></a>
|
||||
<a name="/s:8SocketIO0A9AckStatusO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketAckStatus" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A9AckStatusO">SocketAckStatus</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The status of an ack.</p>
|
||||
|
||||
<a href="Enums/SocketAckStatus.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketAckStatus</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A11ClientEventO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketClientEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO">SocketClientEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The set of events that are generated by the client.</p>
|
||||
|
||||
<a href="Enums/SocketClientEvent.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketClientEvent</span> <span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketIOClientOption" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:O8SocketIO20SocketIOClientOption">SocketIOClientOption</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO">SocketIOClientOption</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -337,14 +299,78 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/c:@M@SocketIO@E@SocketIOClientStatus"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketIOClientStatus" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketIOClientStatus">SocketIOClientStatus</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Represents the state of the client.</p>
|
||||
|
||||
<a href="Enums/SocketIOClientStatus.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketIOClientStatus</span> <span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketParsableError" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO">SocketParsableError</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Errors that can be thrown during parsing.</p>
|
||||
|
||||
<a href="Enums/SocketParsableError.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketParsableError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketAckStatus Enum Reference</title>
|
||||
<title>SocketAckStatus Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Enum/SocketAckStatus" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketAckStatus Enum Reference"></a>
|
||||
<a title="SocketAckStatus Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketAckStatus Enum Reference
|
||||
SocketAckStatus Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO15SocketAckStatus5noAckFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A9AckStatusO02noC0A2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/noAck" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO15SocketAckStatus5noAckFMS0_S0_">noAck</a>
|
||||
<a class="token" href="#/s:8SocketIO0A9AckStatusO02noC0A2CmF">noAck</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -221,8 +215,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketClientEvent Enum Reference</title>
|
||||
<title>SocketClientEvent Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Enum/SocketClientEvent" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketClientEvent Enum Reference"></a>
|
||||
<a title="SocketClientEvent Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketClientEvent Enum Reference
|
||||
SocketClientEvent Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent7connectFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO7connectA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent7connectFMS0_S0_">connect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO7connectA2CmF">connect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -199,7 +193,13 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Emitted when the client connects. This is also called on a successful reconnection.</p>
|
||||
<p>Emitted when the client connects. This is also called on a successful reconnection. A connect event gets one
|
||||
data item: the namespace that was connected to.</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">connect</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||
<span class="k">guard</span> <span class="k">let</span> <span class="nv">nsp</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">as?</span> <span class="kt">String</span> <span class="k">else</span> <span class="p">{</span> <span class="k">return</span> <span class="p">}</span>
|
||||
<span class="c1">// Some logic using the nsp</span>
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
@@ -220,9 +220,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent10disconnectFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO10disconnectA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/disconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent10disconnectFMS0_S0_">disconnect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO10disconnectA2CmF">disconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -251,9 +251,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent5errorFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO5errorA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/error" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent5errorFMS0_S0_">error</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO5errorA2CmF">error</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -282,9 +282,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent9reconnectFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO9reconnectA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent9reconnectFMS0_S0_">reconnect</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO9reconnectA2CmF">reconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -313,9 +313,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent16reconnectAttemptFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO16reconnectAttemptA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectAttempt" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent16reconnectAttemptFMS0_S0_">reconnectAttempt</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO16reconnectAttemptA2CmF">reconnectAttempt</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -344,9 +344,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO17SocketClientEvent12statusChangeFMS0_S0_"></a>
|
||||
<a name="/s:8SocketIO0A11ClientEventO12statusChangeA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/statusChange" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO17SocketClientEvent12statusChangeFMS0_S0_">statusChange</a>
|
||||
<a class="token" href="#/s:8SocketIO0A11ClientEventO12statusChangeA2CmF">statusChange</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -376,8 +376,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketEnginePacketType Enum Reference</title>
|
||||
<title>SocketEnginePacketType Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Enum/SocketEnginePacketType" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketEnginePacketType Enum Reference"></a>
|
||||
<a title="SocketEnginePacketType Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketEnginePacketType Enum Reference
|
||||
SocketEnginePacketType Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType4openFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeOpen"></a>
|
||||
<a name="//apple_ref/swift/Element/open" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4openFMS0_S0_">open</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeOpen">open</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -220,9 +214,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType5closeFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeClose"></a>
|
||||
<a name="//apple_ref/swift/Element/close" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType5closeFMS0_S0_">close</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeClose">close</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -251,9 +245,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType4pingFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypePing"></a>
|
||||
<a name="//apple_ref/swift/Element/ping" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4pingFMS0_S0_">ping</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypePing">ping</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -282,9 +276,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType4pongFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypePong"></a>
|
||||
<a name="//apple_ref/swift/Element/pong" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4pongFMS0_S0_">pong</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypePong">pong</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -313,9 +307,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType7messageFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeMessage"></a>
|
||||
<a name="//apple_ref/swift/Element/message" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType7messageFMS0_S0_">message</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeMessage">message</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -344,9 +338,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType7upgradeFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeUpgrade"></a>
|
||||
<a name="//apple_ref/swift/Element/upgrade" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType7upgradeFMS0_S0_">upgrade</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeUpgrade">upgrade</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -375,9 +369,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO22SocketEnginePacketType4noopFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeNoop"></a>
|
||||
<a name="//apple_ref/swift/Element/noop" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO22SocketEnginePacketType4noopFMS0_S0_">noop</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketEnginePacketType@SocketEnginePacketTypeNoop">noop</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -407,8 +401,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketIOClientOption Enum Reference</title>
|
||||
<title>SocketIOClientOption Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Enum/SocketIOClientOption" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketIOClientOption Enum Reference"></a>
|
||||
<a title="SocketIOClientOption Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketIOClientOption Enum Reference
|
||||
SocketIOClientOption Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,40 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption13connectParamsFMS0_FGVs10DictionarySSP__S0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8compressA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/compress" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8compressA2CmF">compress</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>If given, the WebSocket transport will attempt to use compression.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">compress</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13connectParamsACs10DictionaryVySSypGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connectParams" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption13connectParamsFMS0_FGVs10DictionarySSP__S0_">connectParams</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13connectParamsACs10DictionaryVySSypGcACmF">connectParams</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -220,9 +245,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption7cookiesFMS0_FGSaCSo10HTTPCookie_S0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO7cookiesACSaySo10HTTPCookieCGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/cookies" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption7cookiesFMS0_FGSaCSo10HTTPCookie_S0_">cookies</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO7cookiesACSaySo10HTTPCookieCGcACmF">cookies</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -251,9 +276,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption16doubleEncodeUTF8FMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO16doubleEncodeUTF8ACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/doubleEncodeUTF8" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption16doubleEncodeUTF8FMS0_FSbS0_">doubleEncodeUTF8</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO16doubleEncodeUTF8ACSbcACmF">doubleEncodeUTF8</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -282,9 +307,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption12extraHeadersFMS0_FGVs10DictionarySSSS_S0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12extraHeadersACs10DictionaryVyS2SGcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/extraHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption12extraHeadersFMS0_FGVs10DictionarySSSS_S0_">extraHeaders</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12extraHeadersACs10DictionaryVyS2SGcACmF">extraHeaders</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -313,9 +338,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption8forceNewFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8forceNewACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceNew" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption8forceNewFMS0_FSbS0_">forceNew</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8forceNewACSbcACmF">forceNew</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -345,9 +370,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:FO8SocketIO20SocketIOClientOption12forcePollingFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO12forcePollingACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forcePolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption12forcePollingFMS0_FSbS0_">forcePolling</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO12forcePollingACSbcACmF">forcePolling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -376,9 +401,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:FO8SocketIO20SocketIOClientOption15forceWebsocketsFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15forceWebsocketsACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/forceWebsockets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption15forceWebsocketsFMS0_FSbS0_">forceWebsockets</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15forceWebsocketsACSbcACmF">forceWebsockets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -407,9 +432,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:FO8SocketIO20SocketIOClientOption11handleQueueFMS0_FCSo13DispatchQueueS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11handleQueueACSo08DispatchF0CcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/handleQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption11handleQueueFMS0_FCSo13DispatchQueueS0_">handleQueue</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11handleQueueACSo08DispatchF0CcACmF">handleQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -439,9 +464,9 @@ called on.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption3logFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO3logACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/log" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption3logFMS0_FSbS0_">log</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO3logACSbcACmF">log</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -470,9 +495,9 @@ called on.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption6loggerFMS0_FPS_12SocketLogger_S0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6loggerAcA0A6Logger_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/logger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption6loggerFMS0_FPS_12SocketLogger_S0_">logger</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6loggerAcA0A6Logger_pcACmF">logger</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -501,9 +526,9 @@ called on.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption3nspFMS0_FSSS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO3nspACSScACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/nsp" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption3nspFMS0_FSSS0_">nsp</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO3nspACSScACmF">nsp</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -533,9 +558,9 @@ and <code>leaveNamespace</code> methods on <code><a href="../Classes/SocketIOCli
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption4pathFMS0_FSSS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO4pathACSScACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/path" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption4pathFMS0_FSSS0_">path</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO4pathACSScACmF">path</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -564,9 +589,9 @@ and <code>leaveNamespace</code> methods on <code><a href="../Classes/SocketIOCli
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption10reconnectsFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10reconnectsACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnects" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption10reconnectsFMS0_FSbS0_">reconnects</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10reconnectsACSbcACmF">reconnects</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -596,9 +621,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption17reconnectAttemptsFMS0_FSiS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectAttempts" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption17reconnectAttemptsFMS0_FSiS0_">reconnectAttempts</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO17reconnectAttemptsACSicACmF">reconnectAttempts</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -627,9 +652,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption13reconnectWaitFMS0_FSiS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO13reconnectWaitACSicACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/reconnectWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption13reconnectWaitFMS0_FSiS0_">reconnectWait</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO13reconnectWaitACSicACmF">reconnectWait</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -658,9 +683,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption6secureFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO6secureACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/secure" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption6secureFMS0_FSbS0_">secure</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO6secureACSbcACmF">secure</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -689,9 +714,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption8securityFMS0_FCS_11SSLSecurityS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO8securityAcA11SSLSecurityCcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/security" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption8securityFMS0_FCS_11SSLSecurityS0_">security</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO8securityAcA11SSLSecurityCcACmF">security</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -720,9 +745,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption10selfSignedFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO10selfSignedACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/selfSigned" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption10selfSignedFMS0_FSbS0_">selfSigned</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO10selfSignedACSbcACmF">selfSigned</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -751,9 +776,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption15sessionDelegateFMS0_FPSo18URLSessionDelegate_S0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO15sessionDelegateACSo010URLSessionF0_pcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/sessionDelegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption15sessionDelegateFMS0_FPSo18URLSessionDelegate_S0_">sessionDelegate</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO15sessionDelegateACSo010URLSessionF0_pcACmF">sessionDelegate</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -782,9 +807,9 @@ over when reconnects happen.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientOption11voipEnabledFMS0_FSbS0_"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11voipEnabledACSbcACmF"></a>
|
||||
<a name="//apple_ref/swift/Element/voipEnabled" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientOption11voipEnabledFMS0_FSbS0_">voipEnabled</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11voipEnabledACSbcACmF">voipEnabled</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -821,9 +846,9 @@ the background. <strong>This option is experimental as socket.io shouldn’t
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vO8SocketIO20SocketIOClientOption11descriptionSS"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO11descriptionSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vO8SocketIO20SocketIOClientOption11descriptionSS">description</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO11descriptionSSv">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -859,9 +884,9 @@ the background. <strong>This option is experimental as socket.io shouldn’t
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:ZFO8SocketIO20SocketIOClientOptionoi2eeFTS0_S0__Sb"></a>
|
||||
<a name="/s:8SocketIO0A14IOClientOptionO2eeoiSbAC_ACtFZ"></a>
|
||||
<a name="//apple_ref/swift/Method/==(_:_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:ZFO8SocketIO20SocketIOClientOptionoi2eeFTS0_S0__Sb">==(_:_:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14IOClientOptionO2eeoiSbAC_ACtFZ">==(_:_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -926,8 +951,8 @@ the background. <strong>This option is experimental as socket.io shouldn’t
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketIOClientStatus Enum Reference</title>
|
||||
<title>SocketIOClientStatus Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Enum/SocketIOClientStatus" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketIOClientStatus Enum Reference"></a>
|
||||
<a title="SocketIOClientStatus Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketIOClientStatus Enum Reference
|
||||
SocketIOClientStatus Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientStatus12notConnectedFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusNotConnected"></a>
|
||||
<a name="//apple_ref/swift/Element/notConnected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus12notConnectedFMS0_S0_">notConnected</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusNotConnected">notConnected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -220,9 +214,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientStatus12disconnectedFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusDisconnected"></a>
|
||||
<a name="//apple_ref/swift/Element/disconnected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus12disconnectedFMS0_S0_">disconnected</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusDisconnected">disconnected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -251,9 +245,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientStatus10connectingFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusConnecting"></a>
|
||||
<a name="//apple_ref/swift/Element/connecting" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus10connectingFMS0_S0_">connecting</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusConnecting">connecting</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -282,9 +276,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FO8SocketIO20SocketIOClientStatus9connectedFMS0_S0_"></a>
|
||||
<a name="/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusConnected"></a>
|
||||
<a name="//apple_ref/swift/Element/connected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FO8SocketIO20SocketIOClientStatus9connectedFMS0_S0_">connected</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@E@SocketIOClientStatus@SocketIOClientStatusConnected">connected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -314,8 +308,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>WebSocketDelegate Protocol Reference</title>
|
||||
<title>SocketParsableError Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -14,16 +14,16 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Protocol/WebSocketDelegate" class="dashAnchor"></a>
|
||||
<a name="//apple_ref/swift/Enum/SocketParsableError" class="dashAnchor"></a>
|
||||
|
||||
<a title="WebSocketDelegate Protocol Reference"></a>
|
||||
<a title="SocketParsableError Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
WebSocketDelegate Protocol Reference
|
||||
SocketParsableError Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -170,8 +164,14 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>WebSocketDelegate</h1>
|
||||
<p>Undocumented</p>
|
||||
<h1>SocketParsableError</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">SocketParsableError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Errors that can be thrown during parsing.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -183,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO17WebSocketDelegate19websocketDidConnectFT6socketCS_9WebSocket_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidConnect(socket:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate19websocketDidConnectFT6socketCS_9WebSocket_T_">websocketDidConnect(socket:)</a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO16invalidDataArrayA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidDataArray" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO16invalidDataArrayA2CmF">invalidDataArray</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -193,18 +193,30 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Thrown when a packet received has an invalid data array, or is missing the data array.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">invalidDataArray</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO17WebSocketDelegate22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidDisconnect(socket:error:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate22websocketDidDisconnectFT6socketCS_9WebSocket5errorGSqCSo7NSError__T_">websocketDidDisconnect(socket:error:)</a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO13invalidPacketA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidPacket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO13invalidPacketA2CmF">invalidPacket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -212,18 +224,30 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Thrown when an malformed packet is received.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">invalidPacket</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO17WebSocketDelegate26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidReceiveMessage(socket:text:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_">websocketDidReceiveMessage(socket:text:)</a>
|
||||
<a name="/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeA2CmF"></a>
|
||||
<a name="//apple_ref/swift/Element/invalidPacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A13ParsableErrorO17invalidPacketTypeA2CmF">invalidPacketType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -231,27 +255,16 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Thrown when the parser receives an unknown packet type.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO17WebSocketDelegate23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidReceiveData(socket:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO17WebSocketDelegate23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_">websocketDidReceiveData(socket:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">invalidPacketType</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -264,8 +277,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Global Variables Reference</title>
|
||||
<title>Guides Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -15,14 +15,14 @@
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Global Variables Reference"></a>
|
||||
<a title="Guides Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -37,21 +37,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Global Variables Reference
|
||||
Guides Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -169,83 +163,22 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>Global Variables</h1>
|
||||
<p>The following global variables are available globally.</p>
|
||||
<h1>Guides</h1>
|
||||
<p>The following guides are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:v8SocketIO31WebsocketDidConnectNotificationSS"></a>
|
||||
<a name="//apple_ref/swift/Global/WebsocketDidConnectNotification" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:v8SocketIO34WebsocketDidDisconnectNotificationSS"></a>
|
||||
<a name="//apple_ref/swift/Global/WebsocketDidDisconnectNotification" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS"></a>
|
||||
<a name="//apple_ref/swift/Global/WebsocketDisconnectionErrorKeyName" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
+172
-182
@@ -22,7 +22,7 @@
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -43,15 +43,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -182,73 +176,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO21SocketEngineWebsocket"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineWebsocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO21SocketEngineWebsocket">SocketEngineWebsocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Protocol that is used to implement socket.io WebSocket support</p>
|
||||
|
||||
<a href="Protocols/SocketEngineWebsocket.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO20SocketEnginePollable"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEnginePollable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO20SocketEnginePollable">SocketEnginePollable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Protocol that is used to implement socket.io polling support</p>
|
||||
|
||||
<a href="Protocols/SocketEnginePollable.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEnginePollable</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO16SocketEngineSpec"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO16SocketEngineSpec">SocketEngineSpec</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec">SocketEngineSpec</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -278,9 +208,137 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO10SocketData"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineClient" class="dashAnchor"></a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient">SocketEngineClient</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Declares that a type will be a delegate to an engine.</p>
|
||||
|
||||
<a href="Protocols/SocketEngineClient.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEnginePollable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP">SocketEnginePollable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Protocol that is used to implement socket.io polling support</p>
|
||||
|
||||
<a href="Protocols/SocketEnginePollable.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEnginePollable</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineWebsocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketP">SocketEngineWebsocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Protocol that is used to implement socket.io WebSocket support</p>
|
||||
|
||||
<a href="Protocols/SocketEngineWebsocket.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt">WebSocketDelegate</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12IOClientSpecP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketIOClientSpec" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12IOClientSpecP">SocketIOClientSpec</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Defines the interface for a SocketIOClient.</p>
|
||||
|
||||
<a href="Protocols/SocketIOClientSpec.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketIOClientSpec</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A4DataP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketData" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO10SocketData">SocketData</a>
|
||||
<a class="token" href="#/s:8SocketIO0A4DataP">SocketData</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -323,9 +381,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO12SocketLogger"></a>
|
||||
<a name="/s:8SocketIO0A6LoggerP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketLogger" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO12SocketLogger">SocketLogger</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP">SocketLogger</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -355,9 +413,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO17WebSocketDelegate"></a>
|
||||
<a name="//apple_ref/swift/Protocol/WebSocketDelegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO17WebSocketDelegate">WebSocketDelegate</a>
|
||||
<a name="/s:8SocketIO0A8ParsableP"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketParsable" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP">SocketParsable</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -365,59 +423,15 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Defines that a type will be able to parse socket.io-protocol messages.</p>
|
||||
|
||||
<a href="Protocols/WebSocketDelegate.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO21WebSocketPongDelegate"></a>
|
||||
<a name="//apple_ref/swift/Protocol/WebSocketPongDelegate" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO21WebSocketPongDelegate">WebSocketPongDelegate</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Protocols/WebSocketPongDelegate.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO18SocketEngineClient"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketEngineClient" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO18SocketEngineClient">SocketEngineClient</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Declares that a type will be a delegate to an engine.</p>
|
||||
|
||||
<a href="Protocols/SocketEngineClient.html" class="slightly-smaller">See more</a>
|
||||
<a href="Protocols/SocketParsable.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">@objc</span> <span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineClient</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -426,38 +440,14 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:P8SocketIO17SSLTrustValidator"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SSLTrustValidator" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:P8SocketIO17SSLTrustValidator">SSLTrustValidator</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
<a href="Protocols/SSLTrustValidator.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,215 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SSLTrustValidator Protocol Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Protocol/SSLTrustValidator" class="dashAnchor"></a>
|
||||
|
||||
<a title="SSLTrustValidator Protocol Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SSLTrustValidator Protocol Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SSLTrustValidator</h1>
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO17SSLTrustValidator7isValidFTCSo8SecTrust6domainGSqSS__Sb"></a>
|
||||
<a name="//apple_ref/swift/Method/isValid(_:domain:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO17SSLTrustValidator7isValidFTCSo8SecTrust6domainGSqSS__Sb">isValid(_:domain:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -209,9 +203,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO10SocketData20socketRepresentationFzT_PS0__"></a>
|
||||
<a name="/s:8SocketIO0A4DataP20socketRepresentationAaB_pyKF"></a>
|
||||
<a name="//apple_ref/swift/Method/socketRepresentation()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO10SocketData20socketRepresentationFzT_PS0__">socketRepresentation()</a>
|
||||
<a class="token" href="#/s:8SocketIO0A4DataP20socketRepresentationAaB_pyKF">socketRepresentation()</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -249,8 +243,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -196,9 +190,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO18SocketEngineClient14engineDidErrorFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidErrorWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/engineDidError(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient14engineDidErrorFT6reasonSS_T_">engineDidError(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidErrorWithReason:">engineDidError(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -242,9 +236,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO18SocketEngineClient14engineDidCloseFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidCloseWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/engineDidClose(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient14engineDidCloseFT6reasonSS_T_">engineDidClose(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidCloseWithReason:">engineDidClose(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -288,9 +282,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO18SocketEngineClient13engineDidOpenFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidOpenWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/engineDidOpen(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient13engineDidOpenFT6reasonSS_T_">engineDidOpen(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)engineDidOpenWithReason:">engineDidOpen(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -334,9 +328,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO18SocketEngineClient18parseEngineMessageFSST_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)parseEngineMessage:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineMessage(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient18parseEngineMessageFSST_">parseEngineMessage(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)parseEngineMessage:">parseEngineMessage(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -380,9 +374,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO18SocketEngineClient21parseEngineBinaryDataFV10Foundation4DataT_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineClient(im)parseEngineBinaryData:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineBinaryData(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO18SocketEngineClient21parseEngineBinaryDataFV10Foundation4DataT_">parseEngineBinaryData(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineClient(im)parseEngineBinaryData:">parseEngineBinaryData(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -431,8 +425,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO20SocketEnginePollable11invalidatedSb"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP11invalidatedSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/invalidated" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable11invalidatedSb">invalidated</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP11invalidatedSbv">invalidated</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -217,9 +211,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO20SocketEnginePollable8postWaitGSaSS_"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP8postWaitSaySSGv"></a>
|
||||
<a name="//apple_ref/swift/Property/postWait" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable8postWaitGSaSS_">postWait</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP8postWaitSaySSGv">postWait</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -246,9 +240,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO20SocketEnginePollable7sessionGSqCSo10URLSession_"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgv"></a>
|
||||
<a name="//apple_ref/swift/Property/session" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable7sessionGSqCSo10URLSession_">session</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP7sessionSo10URLSessionCSgv">session</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -273,9 +267,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO20SocketEnginePollable14waitingForPollSb"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPollSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPoll" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable14waitingForPollSb">waitingForPoll</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPollSbv">waitingForPoll</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -303,9 +297,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO20SocketEnginePollable14waitingForPostSb"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP14waitingForPostSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingForPost" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO20SocketEnginePollable14waitingForPostSb">waitingForPost</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP14waitingForPostSbv">waitingForPost</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -333,9 +327,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO20SocketEnginePollable6doPollFT_T_"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP6doPollyyF"></a>
|
||||
<a name="//apple_ref/swift/Method/doPoll()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable6doPollFT_T_">doPoll()</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP6doPollyyF">doPoll()</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -372,9 +366,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO20SocketEnginePollable15sendPollMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP15sendPollMessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendPollMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable15sendPollMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">sendPollMessage(_:withType:withData:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP15sendPollMessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF">sendPollMessage(_:withType:withData:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -454,9 +448,9 @@ disconnect us.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO20SocketEnginePollable11stopPollingFT_T_"></a>
|
||||
<a name="/s:8SocketIO0A14EnginePollableP11stopPollingyyF"></a>
|
||||
<a name="//apple_ref/swift/Method/stopPolling()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO20SocketEnginePollable11stopPollingFT_T_">stopPolling()</a>
|
||||
<a class="token" href="#/s:8SocketIO0A14EnginePollableP11stopPollingyyF">stopPolling()</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -494,8 +488,8 @@ disconnect us.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec6clientXwGSqPS_18SocketEngineClient__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)client"></a>
|
||||
<a name="//apple_ref/swift/Property/client" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec6clientXwGSqPS_18SocketEngineClient__">client</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)client">client</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -206,7 +200,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">weak</span> <span class="k">var</span> <span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight"><code><span class="k">var</span> <span class="nv">client</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineClient.html">SocketEngineClient</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,9 +210,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec6closedSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)closed"></a>
|
||||
<a name="//apple_ref/swift/Property/closed" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec6closedSb">closed</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)closed">closed</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -243,9 +237,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec9connectedSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)connected"></a>
|
||||
<a name="//apple_ref/swift/Property/connected" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec9connectedSb">connected</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)connected">connected</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -270,9 +264,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec13connectParamsGSqGVs10DictionarySSP___"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)connectParams"></a>
|
||||
<a name="//apple_ref/swift/Property/connectParams" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec13connectParamsGSqGVs10DictionarySSP___">connectParams</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)connectParams">connectParams</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -297,9 +291,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec7cookiesGSqGSaCSo10HTTPCookie__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)cookies"></a>
|
||||
<a name="//apple_ref/swift/Property/cookies" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec7cookiesGSqGSaCSo10HTTPCookie__">cookies</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)cookies">cookies</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -324,9 +318,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec11engineQueueCSo13DispatchQueue"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)engineQueue"></a>
|
||||
<a name="//apple_ref/swift/Property/engineQueue" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec11engineQueueCSo13DispatchQueue">engineQueue</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)engineQueue">engineQueue</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -351,9 +345,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec12extraHeadersGSqGVs10DictionarySSSS__"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)extraHeaders"></a>
|
||||
<a name="//apple_ref/swift/Property/extraHeaders" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec12extraHeadersGSqGVs10DictionarySSSS__">extraHeaders</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)extraHeaders">extraHeaders</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -378,9 +372,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec11fastUpgradeSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)fastUpgrade"></a>
|
||||
<a name="//apple_ref/swift/Property/fastUpgrade" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec11fastUpgradeSb">fastUpgrade</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)fastUpgrade">fastUpgrade</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -405,9 +399,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec12forcePollingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)forcePolling"></a>
|
||||
<a name="//apple_ref/swift/Property/forcePolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec12forcePollingSb">forcePolling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)forcePolling">forcePolling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -432,9 +426,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec15forceWebsocketsSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)forceWebsockets"></a>
|
||||
<a name="//apple_ref/swift/Property/forceWebsockets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec15forceWebsocketsSb">forceWebsockets</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)forceWebsockets">forceWebsockets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -459,9 +453,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec7pollingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)polling"></a>
|
||||
<a name="//apple_ref/swift/Property/polling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec7pollingSb">polling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)polling">polling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -486,9 +480,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec7probingSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)probing"></a>
|
||||
<a name="//apple_ref/swift/Property/probing" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec7probingSb">probing</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)probing">probing</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -513,9 +507,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec3sidSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)sid"></a>
|
||||
<a name="//apple_ref/swift/Property/sid" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec3sidSS">sid</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)sid">sid</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -540,9 +534,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec10socketPathSS"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)socketPath"></a>
|
||||
<a name="//apple_ref/swift/Property/socketPath" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec10socketPathSS">socketPath</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)socketPath">socketPath</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -567,9 +561,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec10urlPollingV10Foundation3URL"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)urlPolling"></a>
|
||||
<a name="//apple_ref/swift/Property/urlPolling" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec10urlPollingV10Foundation3URL">urlPolling</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)urlPolling">urlPolling</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -594,9 +588,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec12urlWebSocketV10Foundation3URL"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)urlWebSocket"></a>
|
||||
<a name="//apple_ref/swift/Property/urlWebSocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec12urlWebSocketV10Foundation3URL">urlWebSocket</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)urlWebSocket">urlWebSocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -621,9 +615,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec9websocketSb"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)websocket"></a>
|
||||
<a name="//apple_ref/swift/Property/websocket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec9websocketSb">websocket</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)websocket">websocket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -648,9 +642,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO16SocketEngineSpec2wsGSqCS_9WebSocket_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)ws"></a>
|
||||
<a name="//apple_ref/swift/Property/ws" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO16SocketEngineSpec2wsGSqCS_9WebSocket_">ws</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(py)ws">ws</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -665,7 +659,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight"><code><span class="k">var</span> <span class="nv">ws</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -675,9 +669,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpeccFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL7optionsGSqCSo12NSDictionary__x"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)initWithClient:url:options:"></a>
|
||||
<a name="//apple_ref/swift/Method/init(client:url:options:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpeccFT6clientPS_18SocketEngineClient_3urlV10Foundation3URL7optionsGSqCSo12NSDictionary__x">init(client:url:options:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)initWithClient:url:options:">init(client:url:options:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -745,9 +739,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec7connectFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)connect"></a>
|
||||
<a name="//apple_ref/swift/Method/connect()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec7connectFT_T_">connect()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)connect">connect()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -772,9 +766,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec8didErrorFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)didErrorWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/didError(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec8didErrorFT6reasonSS_T_">didError(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)didErrorWithReason:">didError(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -799,9 +793,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec10disconnectFT6reasonSS_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)disconnectWithReason:"></a>
|
||||
<a name="//apple_ref/swift/Method/disconnect(reason:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec10disconnectFT6reasonSS_T_">disconnect(reason:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)disconnectWithReason:">disconnect(reason:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -845,9 +839,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec13doFastUpgradeFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)doFastUpgrade"></a>
|
||||
<a name="//apple_ref/swift/Method/doFastUpgrade()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec13doFastUpgradeFT_T_">doFastUpgrade()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)doFastUpgrade">doFastUpgrade()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -875,9 +869,9 @@ WebSocket mode.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec30flushWaitingForPostToWebSocketFT_T_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)flushWaitingForPostToWebSocket"></a>
|
||||
<a name="//apple_ref/swift/Method/flushWaitingForPostToWebSocket()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec30flushWaitingForPostToWebSocketFT_T_">flushWaitingForPostToWebSocket()</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)flushWaitingForPostToWebSocket">flushWaitingForPostToWebSocket()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -905,9 +899,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec15parseEngineDataFV10Foundation4DataT_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)parseEngineData:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineData(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec15parseEngineDataFV10Foundation4DataT_">parseEngineData(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)parseEngineData:">parseEngineData(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -951,9 +945,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec18parseEngineMessageFSST_"></a>
|
||||
<a name="/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)parseEngineMessage:"></a>
|
||||
<a name="//apple_ref/swift/Method/parseEngineMessage(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO16SocketEngineSpec18parseEngineMessageFSST_">parseEngineMessage(_:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)parseEngineMessage:">parseEngineMessage(_:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1010,9 +1004,9 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO16SocketEngineSpec5writeFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||
<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="#/s:FP8SocketIO16SocketEngineSpec5writeFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">write(_:withType:withData:)</a>
|
||||
<a class="token" href="#/c:@M@SocketIO@objc(pl)SocketEngineSpec(im)write:withType:withData:">write(_:withType:withData:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -1085,8 +1079,8 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.</p>
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -173,7 +167,7 @@
|
||||
<h1>SocketEngineWebsocket</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt"><a href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a></span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketEngineWebsocket</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a></span><span class="p">,</span> <span class="kt">WebSocketDelegate</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -189,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO21SocketEngineWebsocket20sendWebSocketMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_"></a>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketP07sendWebA7MessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF"></a>
|
||||
<a name="//apple_ref/swift/Method/sendWebSocketMessage(_:withType:withData:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO21SocketEngineWebsocket20sendWebSocketMessageFTSS8withTypeOS_22SocketEnginePacketType8withDataGSaV10Foundation4Data__T_">sendWebSocketMessage(_:withType:withData:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketP07sendWebA7MessageySS_AA0aC10PacketTypeO04withI0Say10Foundation4DataVG0jL0tF">sendWebSocketMessage(_:withType:withData:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -282,9 +276,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FE8SocketIOPS_21SocketEngineWebsocket26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_"></a>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketPAAE26websocketDidReceiveMessagey10Starscream03WebA0C6socket_SS4texttF"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidReceiveMessage(socket:text:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FE8SocketIOPS_21SocketEngineWebsocket26websocketDidReceiveMessageFT6socketCS_9WebSocket4textSS_T_">websocketDidReceiveMessage(socket:text:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketPAAE26websocketDidReceiveMessagey10Starscream03WebA0C6socket_SS4texttF">websocketDidReceiveMessage(socket:text:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Extension method
|
||||
@@ -302,7 +296,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveMessage</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">,</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveMessage</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">,</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -312,9 +306,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FE8SocketIOPS_21SocketEngineWebsocket23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_"></a>
|
||||
<a name="/s:8SocketIO0A15EngineWebsocketPAAE23websocketDidReceiveDatay10Starscream03WebA0C6socket_10Foundation0H0V4datatF"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidReceiveData(socket:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FE8SocketIOPS_21SocketEngineWebsocket23websocketDidReceiveDataFT6socketCS_9WebSocket4dataV10Foundation4Data_T_">websocketDidReceiveData(socket:data:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A15EngineWebsocketPAAE23websocketDidReceiveDatay10Starscream03WebA0C6socket_10Foundation0H0V4datatF">websocketDidReceiveData(socket:data:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Extension method
|
||||
@@ -332,7 +326,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveData</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/WebSocket.html">WebSocket</a></span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">websocketDidReceiveData</span><span class="p">(</span><span class="nv">socket</span><span class="p">:</span> <span class="kt">WebSocket</span><span class="p">,</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -347,8 +341,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -23,7 +23,7 @@
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -44,15 +44,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -196,9 +190,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vP8SocketIO12SocketLogger3logSb"></a>
|
||||
<a name="/s:8SocketIO0A6LoggerP3logSbv"></a>
|
||||
<a name="//apple_ref/swift/Property/log" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vP8SocketIO12SocketLogger3logSb">log</a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3logSbv">log</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -234,9 +228,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO12SocketLogger3logFtSS4typeSS4argsGSaP___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/log(_:type:args:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO12SocketLogger3logFtSS4typeSS4argsGSaP___T_">log(_:type:args:)</a>
|
||||
<a name="/s:8SocketIO0A6LoggerP3logySSyXK_SS4typetF"></a>
|
||||
<a name="//apple_ref/swift/Method/log(_:type:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP3logySSyXK_SS4typetF">log(_:type:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -259,7 +253,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">log</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">args</span><span class="p">:</span> <span class="kt">Any</span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">log</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kd">@autoclosure</span> <span class="p">()</span> <span class="o">-></span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -312,9 +306,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO12SocketLogger5errorFtSS4typeSS4argsGSaP___T_"></a>
|
||||
<a name="//apple_ref/swift/Method/error(_:type:args:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO12SocketLogger5errorFtSS4typeSS4argsGSaP___T_">error(_:type:args:)</a>
|
||||
<a name="/s:8SocketIO0A6LoggerP5errorySSyXK_SS4typetF"></a>
|
||||
<a name="//apple_ref/swift/Method/error(_:type:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6LoggerP5errorySSyXK_SS4typetF">error(_:type:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
@@ -337,7 +331,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">error</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">args</span><span class="p">:</span> <span class="kt">Any</span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">error</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kd">@autoclosure</span> <span class="p">()</span> <span class="o">-></span> <span class="kt">String</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -395,8 +389,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SSLCert Class Reference</title>
|
||||
<title>SocketParsable Protocol Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -14,16 +14,16 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Class/SSLCert" class="dashAnchor"></a>
|
||||
<a name="//apple_ref/swift/Protocol/SocketParsable" class="dashAnchor"></a>
|
||||
|
||||
<a title="SSLCert Class Reference"></a>
|
||||
<a title="SocketParsable Protocol Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SSLCert Class Reference
|
||||
SocketParsable Protocol Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -170,8 +164,14 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SSLCert</h1>
|
||||
<p>Undocumented</p>
|
||||
<h1>SocketParsable</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SocketParsable</span> <span class="p">:</span> <span class="kd">class</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>Defines that a type will be able to parse socket.io-protocol messages.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -179,13 +179,20 @@
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Properties"></a>
|
||||
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||
<a href="#/Properties">
|
||||
<h3 class="section-name">Properties</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO7SSLCertcFT4dataV10Foundation4Data_S0_"></a>
|
||||
<a name="//apple_ref/swift/Method/init(data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO7SSLCertcFT4dataV10Foundation4Data_S0_">init(data:)</a>
|
||||
<a name="/s:8SocketIO0A8ParsableP14waitingPacketsSayAA0A6PacketVGv"></a>
|
||||
<a name="//apple_ref/swift/Property/waitingPackets" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP14waitingPacketsSayAA0A6PacketVGv">waitingPackets</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -193,14 +200,73 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Designated init for certificates</p>
|
||||
<p>A list of packets that are waiting for binary data.</p>
|
||||
|
||||
<p>The way that socket.io works all data should be sent directly after each packet.
|
||||
So this should ideally be an array of one packet waiting for data.</p>
|
||||
|
||||
<p><strong>This should not be modified directly.</strong></p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="k">var</span> <span class="nv">waitingPackets</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/SocketPacket.html">SocketPacket</a></span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Methods"></a>
|
||||
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||
<a href="#/Methods">
|
||||
<h3 class="section-name">Methods</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A8ParsableP15parseBinaryDatay10Foundation0F0VF"></a>
|
||||
<a name="//apple_ref/swift/Method/parseBinaryData(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP15parseBinaryDatay10Foundation0F0VF">parseBinaryData(_:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
</span>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Called when the engine has received some binary data that should be attached to a packet.</p>
|
||||
|
||||
<p>Packets binary data should be sent directly after the packet that expects it, so there’s confusion over
|
||||
where the data should go. Data should be received in the order it is sent, so that the correct data is put
|
||||
into the correct placeholder.</p>
|
||||
|
||||
</div>
|
||||
<h4>Default Implementation</h4>
|
||||
<div class="default_impl abstract">
|
||||
<p>Called when the engine has received some binary data that should be attached to a packet.</p>
|
||||
|
||||
<p>Packets binary data should be sent directly after the packet that expects it, so there’s confusion over
|
||||
where the data should go. Data should be received in the order it is sent, so that the correct data is put
|
||||
into the correct placeholder.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">parseBinaryData</span><span class="p">(</span><span class="n">_</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,41 +282,45 @@
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is the binary data of the certificate</p>
|
||||
<p>The data that should be attached to a packet.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>a representation security object to be used with</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FC8SocketIO7SSLCertcFT3keyCSo6SecKey_S0_"></a>
|
||||
<a name="//apple_ref/swift/Method/init(key:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FC8SocketIO7SSLCertcFT3keyCSo6SecKey_S0_">init(key:)</a>
|
||||
<a name="/s:8SocketIO0A8ParsableP05parseA7MessageySSF"></a>
|
||||
<a name="//apple_ref/swift/Method/parseSocketMessage(_:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A8ParsableP05parseA7MessageySSF">parseSocketMessage(_:)</a>
|
||||
</code>
|
||||
<span class="declaration-note">
|
||||
Default implementation
|
||||
</span>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Designated init for public keys</p>
|
||||
<p>Called when the engine has received a string that should be parsed into a socket.io packet.</p>
|
||||
|
||||
</div>
|
||||
<h4>Default Implementation</h4>
|
||||
<div class="default_impl abstract">
|
||||
<p>Called when the engine has received a string that should be parsed into a socket.io packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">SecKey</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">parseSocketMessage</span><span class="p">(</span><span class="n">_</span> <span class="nv">message</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -261,22 +331,18 @@
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>key</em>
|
||||
<em>message</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>is the public key to be used</p>
|
||||
<p>The string that needs parsing.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Return Value</h4>
|
||||
<p>a representation security object to be used with</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -288,8 +354,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
@@ -1,215 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>WebSocketPongDelegate Protocol Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Protocol/WebSocketPongDelegate" class="dashAnchor"></a>
|
||||
|
||||
<a title="WebSocketPongDelegate Protocol Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
WebSocketPongDelegate Protocol Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>WebSocketPongDelegate</h1>
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FP8SocketIO21WebSocketPongDelegate23websocketDidReceivePongFT6socketCS_9WebSocket4dataGSqV10Foundation4Data__T_"></a>
|
||||
<a name="//apple_ref/swift/Method/websocketDidReceivePong(socket:data:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FP8SocketIO21WebSocketPongDelegate23websocketDidReceivePongFT6socketCS_9WebSocket4dataGSqV10Foundation4Data__T_">websocketDidReceivePong(socket:data:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+103
-45
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Structs Reference</title>
|
||||
<title>Structures Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -15,14 +15,14 @@
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Structs Reference"></a>
|
||||
<a title="Structures Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -37,21 +37,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Structs Reference
|
||||
Structures Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -169,8 +163,8 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>Structs</h1>
|
||||
<p>The following structs are available globally.</p>
|
||||
<h1>Structures</h1>
|
||||
<p>The following structures are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -182,9 +176,41 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:V8SocketIO27SocketIOClientConfiguration"></a>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV"></a>
|
||||
<a name="//apple_ref/swift/Struct/SocketEventHandler" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV">SocketEventHandler</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A wrapper around a handler.</p>
|
||||
|
||||
<a href="Structs/SocketEventHandler.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketEventHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV"></a>
|
||||
<a name="//apple_ref/swift/Struct/SocketIOClientConfiguration" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration">SocketIOClientConfiguration</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV">SocketIOClientConfiguration</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -209,14 +235,46 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV"></a>
|
||||
<a name="//apple_ref/swift/Struct/SocketPacket" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV">SocketPacket</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A struct that represents a socket.io packet.</p>
|
||||
|
||||
<a href="Structs/SocketPacket.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketPacket</span> <span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,365 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketEventHandler Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/SocketEventHandler" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketEventHandler Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketEventHandler Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SocketEventHandler</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketEventHandler</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>A wrapper around a handler.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Properties"></a>
|
||||
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||
<a href="#/Properties">
|
||||
<h3 class="section-name">Properties</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV5eventSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV5eventSSv">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The event for this handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVv"></a>
|
||||
<a name="//apple_ref/swift/Property/id" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV2id10Foundation4UUIDVv">id</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A unique identifier for this handler.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">UUID</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcv"></a>
|
||||
<a name="//apple_ref/swift/Property/callback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A12EventHandlerV8callbackySayypG_AA0A10AckEmitterCtcv">callback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The actual handler function.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">callback</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Methods"></a>
|
||||
<a name="//apple_ref/swift/Section/Methods" class="dashAnchor"></a>
|
||||
<a href="#/Methods">
|
||||
<h3 class="section-name">Methods</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A12EventHandlerV15executeCallbackySayypG4with_Si0G3AckAA0A8IOClientC0gA0tF"></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>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Causes this handler to be executed.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">executeCallback</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="n">withAck</span> <span class="nv">ack</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="n">withSocket</span> <span class="nv">socket</span><span class="p">:</span> <span class="kt"><a href="../Classes/SocketIOClient.html">SocketIOClient</a></span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Parameters</h4>
|
||||
<table class="graybox">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>with</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The data that this handler should be called with.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>withAck</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The ack number that this event expects. Pass -1 to say this event doesn’t expect an ack.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>
|
||||
<em>withSocket</em>
|
||||
</code>
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>The socket that is calling this event.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketIOClientConfiguration Struct Reference</title>
|
||||
<title>SocketIOClientConfiguration Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
<a name="//apple_ref/swift/Struct/SocketIOClientConfiguration" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketIOClientConfiguration Struct Reference"></a>
|
||||
<a title="SocketIOClientConfiguration Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketIOClientConfiguration Struct Reference
|
||||
SocketIOClientConfiguration Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -196,36 +190,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:V8SocketIO27SocketIOClientConfiguration8Iterator"></a>
|
||||
<a name="//apple_ref/swift/Alias/Iterator" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration8Iterator">Iterator</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Iterator type.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Iterator</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">Iterator</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:V8SocketIO27SocketIOClientConfiguration7Element"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV7Elementa"></a>
|
||||
<a name="//apple_ref/swift/Alias/Element" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV7Elementa">Element</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -250,36 +217,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:V8SocketIO27SocketIOClientConfiguration11SubSequence"></a>
|
||||
<a name="//apple_ref/swift/Alias/SubSequence" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration11SubSequence">SubSequence</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>SubSequence type.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">SubSequence</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">SubSequence</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:V8SocketIO27SocketIOClientConfiguration5Index"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5Indexa"></a>
|
||||
<a name="//apple_ref/swift/Alias/Index" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -301,6 +241,60 @@
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV8Iteratora"></a>
|
||||
<a name="//apple_ref/swift/Alias/Iterator" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV8Iteratora">Iterator</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Iterator type.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">Iterator</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">Iterator</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV11SubSequencea"></a>
|
||||
<a name="//apple_ref/swift/Alias/SubSequence" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV11SubSequencea">SubSequence</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>SubSequence type.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">SubSequence</span> <span class="o">=</span> <span class="kt">Array</span><span class="o"><</span><span class="kt"><a href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a></span><span class="o">>.</span><span class="kt">SubSequence</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
@@ -315,9 +309,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vV8SocketIO27SocketIOClientConfiguration10startIndexSi"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv"></a>
|
||||
<a name="//apple_ref/swift/Property/startIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration10startIndexSi">startIndex</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv">startIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -332,7 +326,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">startIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">startIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -342,9 +336,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vV8SocketIO27SocketIOClientConfiguration8endIndexSi"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv"></a>
|
||||
<a name="//apple_ref/swift/Property/endIndex" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration8endIndexSi">endIndex</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv">endIndex</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -359,7 +353,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">endIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">endIndex</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -369,9 +363,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vV8SocketIO27SocketIOClientConfiguration7isEmptySb"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv"></a>
|
||||
<a name="//apple_ref/swift/Property/isEmpty" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration7isEmptySb">isEmpty</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv">isEmpty</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -396,9 +390,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vV8SocketIO27SocketIOClientConfiguration5countSi"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5countSiv"></a>
|
||||
<a name="//apple_ref/swift/Property/count" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration5countSi">count</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5countSiv">count</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -413,7 +407,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">count</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span><span class="o">.</span><span class="kt">Stride</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">count</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="o">.</span><span class="kt">Stride</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -423,9 +417,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:vV8SocketIO27SocketIOClientConfiguration5firstGSqOS_20SocketIOClientOption_"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv"></a>
|
||||
<a name="//apple_ref/swift/Property/first" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:vV8SocketIO27SocketIOClientConfiguration5firstGSqOS_20SocketIOClientOption_">first</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv">first</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -440,7 +434,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">first</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="p">?</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">first</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa">Element</a></span><span class="p">?</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -461,9 +455,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FV8SocketIO27SocketIOClientConfigurationcFt12arrayLiteralGSaOS_20SocketIOClientOption__S0_"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationVACSayAA0aC6OptionOG12arrayLiterald_tcfc"></a>
|
||||
<a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfigurationcFt12arrayLiteralGSaOS_20SocketIOClientOption__S0_">init(arrayLiteral:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationVACSayAA0aC6OptionOG12arrayLiterald_tcfc">init(arrayLiteral:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -478,7 +472,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">arrayLiteral</span> <span class="nv">elements</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">arrayLiteral</span> <span class="nv">elements</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa">Element</a></span><span class="o">...</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -518,9 +512,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FV8SocketIO27SocketIOClientConfiguration12makeIteratorFT_GVs16IndexingIteratorGSaOS_20SocketIOClientOption__"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV12makeIterators08IndexingF0VySayAA0aC6OptionOGGyF"></a>
|
||||
<a name="//apple_ref/swift/Method/makeIterator()" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration12makeIteratorFT_GVs16IndexingIteratorGSaOS_20SocketIOClientOption__">makeIterator()</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV12makeIterators08IndexingF0VySayAA0aC6OptionOGGyF">makeIterator()</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -535,7 +529,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">makeIterator</span><span class="p">()</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration8Iterator">Iterator</a></span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">makeIterator</span><span class="p">()</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8Iteratora">Iterator</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -549,9 +543,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FV8SocketIO27SocketIOClientConfiguration5indexFT5afterSi_Si"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV5indexS2i5after_tF"></a>
|
||||
<a name="//apple_ref/swift/Method/index(after:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration5indexFT5afterSi_Si">index(after:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV5indexS2i5after_tF">index(after:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -565,7 +559,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">index</span><span class="p">(</span><span class="n">after</span> <span class="nv">i</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index">Index</a></span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">index</span><span class="p">(</span><span class="n">after</span> <span class="nv">i</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa">Index</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -579,9 +573,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FV8SocketIO27SocketIOClientConfiguration6insertFTOS_20SocketIOClientOption9replacingSb_T_"></a>
|
||||
<a name="/s:8SocketIO0A21IOClientConfigurationV6insertyAA0aC6OptionO_Sb9replacingtF"></a>
|
||||
<a name="//apple_ref/swift/Method/insert(_:replacing:)" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FV8SocketIO27SocketIOClientConfiguration6insertFTOS_20SocketIOClientOption9replacingSb_T_">insert(_:replacing:)</a>
|
||||
<a class="token" href="#/s:8SocketIO0A21IOClientConfigurationV6insertyAA0aC6OptionO_Sb9replacingtF">insert(_:replacing:)</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -596,7 +590,7 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">insert</span><span class="p">(</span><span class="n">_</span> <span class="nv">element</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element">Element</a></span><span class="p">,</span> <span class="n">replacing</span> <span class="nv">replace</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">mutating</span> <span class="kd">func</span> <span class="nf">insert</span><span class="p">(</span><span class="n">_</span> <span class="nv">element</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa">Element</a></span><span class="p">,</span> <span class="n">replacing</span> <span class="nv">replace</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -642,8 +636,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,488 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>SocketPacket Structure Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="../js/jquery.min.js" defer></script>
|
||||
<script src="../js/jazzy.js" defer></script>
|
||||
|
||||
<script src="../js/lunr.min.js" defer></script>
|
||||
<script src="../js/typeahead.jquery.js" defer></script>
|
||||
<script src="../js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Struct/SocketPacket" class="dashAnchor"></a>
|
||||
|
||||
<a title="SocketPacket Structure Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="../search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../img/carat.png" />
|
||||
SocketPacket Structure Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>SocketPacket</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">SocketPacket</span> <span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>A struct that represents a socket.io packet.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/Properties"></a>
|
||||
<a name="//apple_ref/swift/Section/Properties" class="dashAnchor"></a>
|
||||
<a href="#/Properties">
|
||||
<h3 class="section-name">Properties</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV3nspSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/nsp" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV3nspSSv">nsp</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The namespace for this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">nsp</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV2idSiv"></a>
|
||||
<a name="//apple_ref/swift/Property/id" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV2idSiv">id</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>If > 0 then this packet is using acking.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4typeAC0C4TypeOv"></a>
|
||||
<a name="//apple_ref/swift/Property/type" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4typeAC0C4TypeOv">type</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The type of this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Structs/SocketPacket/PacketType.html">PacketType</a></span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv"></a>
|
||||
<a name="//apple_ref/swift/Property/binary" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv">binary</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>An array of binary data for this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4dataSayypGv"></a>
|
||||
<a name="//apple_ref/swift/Property/data" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4dataSayypGv">data</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The data for this event.</p>
|
||||
|
||||
<p>Note: This includes all data inside of the socket.io packet payload array, which includes the event name for
|
||||
event type packets.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV4argsSayypGv"></a>
|
||||
<a name="//apple_ref/swift/Property/args" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV4argsSayypGv">args</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">args</span><span class="p">:</span> <span class="p">[</span><span class="kt">Any</span><span class="p">]</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV11descriptionSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV11descriptionSSv">description</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A string representation of this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV5eventSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV5eventSSv">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The event name for this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">event</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV12packetStringSSv"></a>
|
||||
<a name="//apple_ref/swift/Property/packetString" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV12packetStringSSv">packetString</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A string representation of this packet.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">packetString</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<div class="task-name-container">
|
||||
<a name="/PacketType%20enum"></a>
|
||||
<a name="//apple_ref/swift/Section/PacketType enum" class="dashAnchor"></a>
|
||||
<a href="#/PacketType%20enum">
|
||||
<h3 class="section-name">PacketType enum</h3>
|
||||
</a>
|
||||
</div>
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO"></a>
|
||||
<a name="//apple_ref/swift/Enum/PacketType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO">PacketType</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>The type of packets.</p>
|
||||
|
||||
<a href="../Structs/SocketPacket/PacketType.html" class="slightly-smaller">See more</a>
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">PacketType</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+126
-93
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>CloseCode Enum Reference</title>
|
||||
<title>PacketType Enumeration Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -14,16 +14,16 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a name="//apple_ref/swift/Enum/CloseCode" class="dashAnchor"></a>
|
||||
<a name="//apple_ref/swift/Enum/PacketType" class="dashAnchor"></a>
|
||||
|
||||
<a title="CloseCode Enum Reference"></a>
|
||||
<a title="PacketType Enumeration Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="../../index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -38,21 +38,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="../../index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="../../img/carat.png" />
|
||||
CloseCode Enum Reference
|
||||
PacketType Enumeration Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -71,30 +76,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="../../Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -111,14 +96,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -134,33 +119,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="../../Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="../../Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="../../Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="../../Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="../../Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -170,8 +164,14 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>CloseCode</h1>
|
||||
<p>Undocumented</p>
|
||||
<h1>PacketType</h1>
|
||||
<div class="declaration">
|
||||
<div class="language">
|
||||
<pre class="highlight"><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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<p>The type of packets.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -183,9 +183,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode6normalFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/normal" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode6normalFMS1_S1_">normal</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/connect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF">connect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -193,9 +193,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Connect: 0</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">connect</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -206,9 +214,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode9goingAwayFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/goingAway" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode9goingAwayFMS1_S1_">goingAway</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/disconnect" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF">disconnect</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -216,9 +224,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Disconnect: 1</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">disconnect</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -229,9 +245,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode13protocolErrorFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/protocolError" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode13protocolErrorFMS1_S1_">protocolError</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/event" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF">event</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -239,9 +255,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Event: 2</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">event</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -252,9 +276,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode21protocolUnhandledTypeFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/protocolUnhandledType" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode21protocolUnhandledTypeFMS1_S1_">protocolUnhandledType</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/ack" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF">ack</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -262,9 +286,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Ack: 3</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">ack</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -275,9 +307,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode16noStatusReceivedFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/noStatusReceived" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode16noStatusReceivedFMS1_S1_">noStatusReceived</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/error" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF">error</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -285,9 +317,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Error: 4</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">error</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -298,9 +338,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode8encodingFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/encoding" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode8encodingFMS1_S1_">encoding</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/binaryEvent" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF">binaryEvent</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -308,9 +348,17 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Binary Event: 5</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">binaryEvent</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
@@ -321,9 +369,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode14policyViolatedFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/policyViolated" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode14policyViolatedFMS1_S1_">policyViolated</a>
|
||||
<a name="/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF"></a>
|
||||
<a name="//apple_ref/swift/Element/binaryAck" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF">binaryAck</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -331,31 +379,16 @@
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<p>Binary Ack: 6</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="task-group">
|
||||
<ul class="item-container">
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:FOC8SocketIO9WebSocket9CloseCode13messageTooBigFMS1_S1_"></a>
|
||||
<a name="//apple_ref/swift/Element/messageTooBig" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:FOC8SocketIO9WebSocket9CloseCode13messageTooBigFMS1_S1_">messageTooBig</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>Undocumented</p>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="k">case</span> <span class="n">binaryAck</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -368,8 +401,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
+67
-73
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Typealiases Reference</title>
|
||||
<title>Type Aliases Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
@@ -15,14 +15,14 @@
|
||||
<body>
|
||||
|
||||
|
||||
<a title="Typealiases Reference"></a>
|
||||
<a title="Type Aliases Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -37,21 +37,26 @@
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
Typealiases Reference
|
||||
Type Aliases Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -169,8 +163,8 @@
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
<h1>Typealiases</h1>
|
||||
<p>The following typealiases are available globally.</p>
|
||||
<h1>Type Aliases</h1>
|
||||
<p>The following type aliases are available globally.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
@@ -182,36 +176,9 @@
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO14NormalCallback"></a>
|
||||
<a name="//apple_ref/swift/Alias/NormalCallback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A typealias for a normal callback.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">NormalCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">],</span> <span class="kt"><a href="Classes/SocketAckEmitter.html">SocketAckEmitter</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt">Void</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO11AckCallback"></a>
|
||||
<a name="/s:8SocketIO11AckCallbacka"></a>
|
||||
<a name="//apple_ref/swift/Alias/AckCallback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="token" href="#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
@@ -226,7 +193,34 @@
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">AckCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="kt">Void</span></code></pre>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">AckCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">])</span> <span class="o">-></span> <span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>
|
||||
<code>
|
||||
<a name="/s:8SocketIO14NormalCallbacka"></a>
|
||||
<a name="//apple_ref/swift/Alias/NormalCallback" class="dashAnchor"></a>
|
||||
<a class="token" href="#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</code>
|
||||
</div>
|
||||
<div class="height-container">
|
||||
<div class="pointer-container"></div>
|
||||
<section class="section">
|
||||
<div class="pointer"></div>
|
||||
<div class="abstract">
|
||||
<p>A typealias for a normal callback.</p>
|
||||
|
||||
</div>
|
||||
<div class="declaration">
|
||||
<h4>Declaration</h4>
|
||||
<div class="language">
|
||||
<p class="aside-title">Swift</p>
|
||||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">NormalCallback</span> <span class="o">=</span> <span class="p">([</span><span class="kt">Any</span><span class="p">],</span> <span class="kt"><a href="Classes/SocketAckEmitter.html">SocketAckEmitter</a></span><span class="p">)</span> <span class="o">-></span> <span class="p">()</span></code></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,8 +235,8 @@
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="128" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h93v20H0z"/><path fill="#a4a61d" d="M93 0h35v20H93z"/><path fill="url(#b)" d="M0 0h128v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="46.5" y="15" fill="#010101" fill-opacity=".3">documentation</text><text x="46.5" y="14">documentation</text><text x="109.5" y="15" fill="#010101" fill-opacity=".3">84%</text><text x="109.5" y="14">84%</text></g></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="20"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="136" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path fill="#555" d="M0 0h93v20H0z"/><path fill="#4c1" d="M93 0h43v20H93z"/><path fill="url(#b)" d="M0 0h136v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11"><text x="46.5" y="15" fill="#010101" fill-opacity=".3">documentation</text><text x="46.5" y="14">documentation</text><text x="113.5" y="15" fill="#010101" fill-opacity=".3">100%</text><text x="113.5" y="14">100%</text></g></svg>
|
||||
|
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 807 B |
+227
@@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>FAQ Reference</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||||
<meta charset="utf-8">
|
||||
<script src="js/jquery.min.js" defer></script>
|
||||
<script src="js/jazzy.js" defer></script>
|
||||
|
||||
<script src="js/lunr.min.js" defer></script>
|
||||
<script src="js/typeahead.jquery.js" defer></script>
|
||||
<script src="js/jazzy.search.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<a title="FAQ Reference"></a>
|
||||
|
||||
<header class="header">
|
||||
<p class="header-col header-col--primary">
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
<form role="search" action="search.json">
|
||||
<input type="text" placeholder="Search documentation" data-typeahead>
|
||||
</form>
|
||||
</p>
|
||||
|
||||
|
||||
</header>
|
||||
|
||||
<p class="breadcrumbs">
|
||||
<a class="breadcrumb" href="index.html">SocketIO Reference</a>
|
||||
<img class="carat" src="img/carat.png" />
|
||||
FAQ Reference
|
||||
</p>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketAckEmitter.html">SocketAckEmitter</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketAnyEvent.html">SocketAnyEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketClientManager.html">SocketClientManager</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketEngine.html">SocketEngine</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketClientEvent.html">SocketClientEvent</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketEnginePacketType.html">SocketEnginePacketType</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientOption.html">SocketIOClientOption</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineClient.html">SocketEngineClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEnginePollable.html">SocketEnginePollable</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineSpec.html">SocketEngineSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article class="main-content">
|
||||
|
||||
<section class="section">
|
||||
<div class="section-content">
|
||||
|
||||
<h2 id='how-do-i-connect-to-my-websocket-server' class='heading'>How do I connect to my WebSocket server?</h2>
|
||||
|
||||
<p>This library is <strong>NOT</strong> a WebSockets library. This library is only for servers that implement the socket.io protocol,
|
||||
such as <a href="https://socket.io/">socket.io</a>. If you need a plain WebSockets client check out
|
||||
<a href="https://github.com/daltoniam/Starscream">Starscream</a> for Swift and <a href="https://github.com/acmacalister/jetfire">JetFire</a>
|
||||
for Objective-C.</p>
|
||||
<h2 id='why-isn-39-t-my-event-handler-being-called' class='heading'>Why isn’t my event handler being called?</h2>
|
||||
|
||||
<p>One of the most common reasons your event might not be called is if the client is released by
|
||||
<a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html">ARC</a>.</p>
|
||||
|
||||
<p>Take this code for example:</p>
|
||||
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">SocketManager</span> <span class="p">{</span>
|
||||
<span class="kd">func</span> <span class="nf">addHandlers</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://somesocketioserver.com"</span><span class="p">)</span><span class="o">!</span><span class="p">)</span>
|
||||
|
||||
<span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||
<span class="nf">print</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="p">}</span>
|
||||
</code></pre>
|
||||
|
||||
<p>This code is <strong>incorrect</strong>, and the event handler will never be called. Because as soon as this method is called <code>socket</code>
|
||||
will be released and its memory reclaimed.</p>
|
||||
|
||||
<p>A correct way would be:</p>
|
||||
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">SocketManager</span> <span class="p">{</span>
|
||||
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://somesocketioserver.com"</span><span class="p">)</span><span class="o">!</span><span class="p">)</span>
|
||||
|
||||
<span class="kd">func</span> <span class="nf">addHandlers</span><span class="p">()</span> <span class="p">{</span>
|
||||
<span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="s">"myEvent"</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||
<span class="nf">print</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
</code></pre>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Another case where this might happen is if you use namespaces in your socket.io application.</p>
|
||||
|
||||
<p>In the JavaScript client a url that looks like <code>http://somesocketioserver.com/client</code> would be done with the <code>nsp</code> config.</p>
|
||||
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://somesocketioserver.com"</span><span class="p">)</span><span class="o">!</span><span class="p">,</span> <span class="nv">config</span><span class="p">:</span> <span class="p">[</span><span class="o">.</span><span class="nf">nsp</span><span class="p">(</span><span class="s">"/client"</span><span class="p">)])</span>
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
</html>
|
||||
+56
-68
@@ -22,7 +22,7 @@
|
||||
<a class="header-link" href="index.html">
|
||||
SocketIO Docs
|
||||
</a>
|
||||
(84% documented)
|
||||
(100% documented)
|
||||
</p>
|
||||
|
||||
<p class="header-col--secondary">
|
||||
@@ -43,15 +43,20 @@
|
||||
<div class="content-wrapper">
|
||||
<nav class="navigation">
|
||||
<ul class="nav-groups">
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Guides.html">Guides</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="faq.html">FAQ</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/OnAckCallback.html">OnAckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLCert.html">SSLCert</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SSLSecurity.html">SSLSecurity</a>
|
||||
</li>
|
||||
@@ -70,30 +75,10 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/SocketIOClient.html">SocketIOClient</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket.html">WebSocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Classes/WebSocket/CloseCode.html">– CloseCode</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Global Variables.html">Global Variables</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO31WebsocketDidConnectNotificationSS">WebsocketDidConnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDidDisconnectNotificationSS">WebsocketDidDisconnectNotification</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Global Variables.html#/s:v8SocketIO34WebsocketDisconnectionErrorKeyNameSS">WebsocketDisconnectionErrorKeyName</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||||
<a class="nav-group-name-link" href="Enums.html">Enumerations</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketAckStatus.html">SocketAckStatus</a>
|
||||
@@ -110,14 +95,14 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketIOClientStatus.html">SocketIOClientStatus</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Enums/SocketParsableError.html">SocketParsableError</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SSLTrustValidator.html">SSLTrustValidator</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketData.html">SocketData</a>
|
||||
</li>
|
||||
@@ -133,33 +118,42 @@
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketEngineWebsocket.html">SocketEngineWebsocket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketIOClientSpec.html">SocketIOClientSpec</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/SocketLogger.html">SocketLogger</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketDelegate.html">WebSocketDelegate</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Protocols/WebSocketPongDelegate.html">WebSocketPongDelegate</a>
|
||||
<a class="nav-group-task-link" href="Protocols/SocketParsable.html">SocketParsable</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||||
<a class="nav-group-name-link" href="Structs.html">Structures</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketEventHandler.html">SocketEventHandler</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketIOClientConfiguration.html">SocketIOClientConfiguration</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket.html">SocketPacket</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Structs/SocketPacket/PacketType.html">– PacketType</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-group-name">
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Typealiases</a>
|
||||
<a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
|
||||
<ul class="nav-group-tasks">
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallback">AckCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO11AckCallbacka">AckCallback</a>
|
||||
</li>
|
||||
<li class="nav-group-task">
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallback">NormalCallback</a>
|
||||
<a class="nav-group-task-link" href="Typealiases.html#/s:8SocketIO14NormalCallbacka">NormalCallback</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -177,7 +171,7 @@
|
||||
<h2 id='example' class='heading'>Example</h2>
|
||||
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">SocketIO</span>
|
||||
|
||||
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://localhost:8080"</span><span class="p">)</span><span class="o">!</span><span class="p">,</span> <span class="nv">config</span><span class="p">:</span> <span class="p">[</span><span class="o">.</span><span class="nf">log</span><span class="p">(</span><span class="kc">true</span><span class="p">),</span> <span class="o">.</span><span class="nf">forcePolling</span><span class="p">(</span><span class="kc">true</span><span class="p">)])</span>
|
||||
<span class="k">let</span> <span class="nv">socket</span> <span class="o">=</span> <span class="kt">SocketIOClient</span><span class="p">(</span><span class="nv">socketURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"http://localhost:8080"</span><span class="p">)</span><span class="o">!</span><span class="p">,</span> <span class="nv">config</span><span class="p">:</span> <span class="p">[</span><span class="o">.</span><span class="nf">log</span><span class="p">(</span><span class="kc">true</span><span class="p">),</span> <span class="o">.</span><span class="n">compress</span><span class="p">])</span>
|
||||
|
||||
<span class="n">socket</span><span class="o">.</span><span class="nf">on</span><span class="p">(</span><span class="nv">clientEvent</span><span class="p">:</span> <span class="o">.</span><span class="n">connect</span><span class="p">)</span> <span class="p">{</span><span class="n">data</span><span class="p">,</span> <span class="n">ack</span> <span class="k">in</span>
|
||||
<span class="nf">print</span><span class="p">(</span><span class="s">"socket connected"</span><span class="p">)</span>
|
||||
@@ -198,7 +192,7 @@
|
||||
<h2 id='objective-c-example' class='heading'>Objective-C Example</h2>
|
||||
<pre class="highlight plaintext"><code>@import SocketIO;
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
|
||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
|
||||
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"compress": @YES}];
|
||||
|
||||
[socket on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
|
||||
NSLog(@"socket connected");
|
||||
@@ -208,7 +202,7 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
double cur = [[data objectAtIndex:0] floatValue];
|
||||
|
||||
[[socket emitWithAck:@"canUpdate" with:@[@(cur)]] timingOutAfter:0 callback:^(NSArray* data) {
|
||||
[socket emit:@"update" withItems:@[@{@"amount": @(cur + 2.50)}]];
|
||||
[socket emit:@"update" with:@[@{@"amount": @(cur + 2.50)}]];
|
||||
}];
|
||||
|
||||
[ack with:@[@"Got your currentAmount, ", @"dude"]];
|
||||
@@ -226,34 +220,33 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
<li>Supports TLS/SSL</li>
|
||||
<li>Can be used from Objective-C</li>
|
||||
</ul>
|
||||
<h2 id='faqs' class='heading'>FAQS</h2>
|
||||
|
||||
<p>Checkout the <a href="https://nuclearace.github.io/Socket.IO-Client-Swift/faq.html">FAQs</a> for commonly asked questions.</p>
|
||||
<h2 id='installation' class='heading'>Installation</h2>
|
||||
|
||||
<p>Requires Swift 3/Xcode 8.x</p>
|
||||
<p>Requires Swift 4/Xcode 9.x</p>
|
||||
|
||||
<p>If you need swift 2.3 use the swift2.3 tag (Pre-Swift 3 support is no longer maintained)</p>
|
||||
<p>If you need Swift 2.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>
|
||||
|
||||
<p>If you need swift 2.2 use 7.x (Pre-Swift 3 support is no longer maintained)</p>
|
||||
|
||||
<p>If you need Swift 2.1 use v5.5.0 (Pre-Swift 2.2 support is no longer maintained)</p>
|
||||
|
||||
<p>If you need Swift 1.2 use v2.4.5 (Pre-Swift 2 support is no longer maintained)</p>
|
||||
|
||||
<p>If you need Swift 1.1 use v1.5.2. (Pre-Swift 1.2 support is no longer maintained)</p>
|
||||
<h3 id='manually-ios-7' class='heading'>Manually (iOS 7+)</h3>
|
||||
|
||||
<ol>
|
||||
<li>Copy the Source folder into your Xcode project. (Make sure you add the files to your target(s))</li>
|
||||
<li>If you plan on using this from Objective-C, read <a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html">this</a> on exposing Swift code to Objective-C.</li>
|
||||
</ol>
|
||||
<p>If you need Swift 3.x use v11.1.3.</p>
|
||||
<h3 id='swift-package-manager' class='heading'>Swift Package Manager</h3>
|
||||
|
||||
<p>Add the project as a dependency to your Package.swift:</p>
|
||||
<pre class="highlight swift"><code><span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||
<pre class="highlight swift"><code><span class="c1">// swift-tools-version:4.0</span>
|
||||
|
||||
<span class="kd">import</span> <span class="kt">PackageDescription</span>
|
||||
|
||||
<span class="k">let</span> <span class="nv">package</span> <span class="o">=</span> <span class="kt">Package</span><span class="p">(</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"YourSocketIOProject"</span><span class="p">,</span>
|
||||
<span class="nv">name</span><span class="p">:</span> <span class="s">"socket.io-test"</span><span class="p">,</span>
|
||||
<span class="nv">products</span><span class="p">:</span> <span class="p">[</span>
|
||||
<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="kt">Package</span><span class="p">(</span><span class="nv">url</span><span class="p">:</span> <span class="s">"https://github.com/socketio/socket.io-client-swift"</span><span class="p">,</span> <span class="nv">majorVersion</span><span class="p">:</span> <span class="mi">9</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">upToNextMajor</span><span class="p">(</span><span class="nv">from</span><span class="p">:</span> <span class="s">"12.1.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>
|
||||
<span class="p">]</span>
|
||||
<span class="p">)</span>
|
||||
</code></pre>
|
||||
@@ -262,17 +255,19 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
<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" ~> 9.0.1 # Or latest version
|
||||
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift" ~> 12.1.2 # Or latest version
|
||||
</code></pre>
|
||||
|
||||
<p>Run <code>carthage update --platform ios,macosx</code>.</p>
|
||||
|
||||
<p>Add the <code>Starscream</code> and <code>SocketIO</code> frameworks to your projects and follow the usual Carthage process.</p>
|
||||
<h3 id='cocoapods-1-0-0-or-later' class='heading'>CocoaPods 1.0.0 or later</h3>
|
||||
|
||||
<p>Create <code>Podfile</code> and add <code>pod 'Socket.IO-Client-Swift'</code>:</p>
|
||||
<pre class="highlight ruby"><code><span class="n">use_frameworks!</span>
|
||||
|
||||
<span class="n">target</span> <span class="s1">'YourApp'</span> <span class="k">do</span>
|
||||
<span class="n">pod</span> <span class="s1">'Socket.IO-Client-Swift'</span><span class="p">,</span> <span class="s1">'~> 9.0.1'</span> <span class="c1"># Or latest version</span>
|
||||
<span class="n">pod</span> <span class="s1">'Socket.IO-Client-Swift'</span><span class="p">,</span> <span class="s1">'~> 12.1.2'</span> <span class="c1"># Or latest version</span>
|
||||
<span class="k">end</span>
|
||||
</code></pre>
|
||||
|
||||
@@ -289,13 +284,6 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
<p>Objective-C:</p>
|
||||
<pre class="highlight plaintext"><code>@import SocketIO;
|
||||
</code></pre>
|
||||
<h3 id='cocoaseeds' class='heading'>CocoaSeeds</h3>
|
||||
|
||||
<p>Add this line to your <code>Seedfile</code>:</p>
|
||||
<pre class="highlight plaintext"><code>github "socketio/socket.io-client-swift", "v9.0.1", :files => "Source/*.swift" # Or latest version
|
||||
</code></pre>
|
||||
|
||||
<p>Run <code>seed install</code>.</p>
|
||||
<h1 id='a-href-https-nuclearace-github-io-socket-io-client-swift-index-html-docs-a' class='heading'><a href="https://nuclearace.github.io/Socket.IO-Client-Swift/index.html">Docs</a></h1>
|
||||
|
||||
<ul>
|
||||
@@ -319,8 +307,8 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
|
||||
</article>
|
||||
</div>
|
||||
<section class="footer">
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-05-27)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
<p>© 2017 <a class="link" href="https://github.com/socketio/socket.io-client-swift" target="_blank" rel="external">Erik</a>. All rights reserved. (Last updated: 2017-10-05)</p>
|
||||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||||
</section>
|
||||
</body>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"Typealiases.html#/s:8SocketIO14NormalCallback":{"name":"NormalCallback","abstract":"<p>A typealias for a normal callback.</p>"},"Typealiases.html#/s:8SocketIO11AckCallback":{"name":"AckCallback","abstract":"<p>A typealias for an ack callback.</p>"},"Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration8Iterator":{"name":"Iterator","abstract":"<p>Iterator type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration7Element":{"name":"Element","abstract":"<p>Type of element stored.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration11SubSequence":{"name":"SubSequence","abstract":"<p>SubSequence type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:V8SocketIO27SocketIOClientConfiguration5Index":{"name":"Index","abstract":"<p>Index type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:vV8SocketIO27SocketIOClientConfiguration10startIndexSi":{"name":"startIndex","abstract":"<p>The start index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:vV8SocketIO27SocketIOClientConfiguration8endIndexSi":{"name":"endIndex","abstract":"<p>The end index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:vV8SocketIO27SocketIOClientConfiguration7isEmptySb":{"name":"isEmpty","abstract":"<p>Whether this collection is empty.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:vV8SocketIO27SocketIOClientConfiguration5countSi":{"name":"count","abstract":"<p>The number of elements stored in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:vV8SocketIO27SocketIOClientConfiguration5firstGSqOS_20SocketIOClientOption_":{"name":"first","abstract":"<p>The first element in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:FV8SocketIO27SocketIOClientConfigurationcFt12arrayLiteralGSaOS_20SocketIOClientOption__S0_":{"name":"init(arrayLiteral:)","abstract":"<p>Creates a new <code>SocketIOClientConfiguration</code> from an array literal.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:FV8SocketIO27SocketIOClientConfiguration12makeIteratorFT_GVs16IndexingIteratorGSaOS_20SocketIOClientOption__":{"name":"makeIterator()","abstract":"<p>Creates an iterator for this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:FV8SocketIO27SocketIOClientConfiguration5indexFT5afterSi_Si":{"name":"index(after:)","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:FV8SocketIO27SocketIOClientConfiguration6insertFTOS_20SocketIOClientOption9replacingSb_T_":{"name":"insert(_:replacing:)","abstract":"<p>Special method that inserts <code>element</code> into the collection, replacing any other instances of <code>element</code>.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html":{"name":"SocketIOClientConfiguration","abstract":"<p>An array-like type that holds <code><a href=\"36f8f5912051ae747ef441d6511ca4cbEnums/SocketIOClientOption.html\">SocketIOClientOption</a></code>s</p>"},"Protocols/SSLTrustValidator.html#/s:FP8SocketIO17SSLTrustValidator7isValidFTCSo8SecTrust6domainGSqSS__Sb":{"name":"isValid(_:domain:)","abstract":"<p>Undocumented</p>","parent_name":"SSLTrustValidator"},"Protocols/SocketEngineClient.html#/s:FP8SocketIO18SocketEngineClient14engineDidErrorFT6reasonSS_T_":{"name":"engineDidError(reason:)","abstract":"<p>Called when the engine errors.</p>","parent_name":"SocketEngineClient"},"Protocols/SocketEngineClient.html#/s:FP8SocketIO18SocketEngineClient14engineDidCloseFT6reasonSS_T_":{"name":"engineDidClose(reason:)","abstract":"<p>Called when the engine closes.</p>","parent_name":"SocketEngineClient"},"Protocols/SocketEngineClient.html#/s:FP8SocketIO18SocketEngineClient13engineDidOpenFT6reasonSS_T_":{"name":"engineDidOpen(reason:)","abstract":"<p>Called when the engine opens.</p>","parent_name":"SocketEngineClient"},"Protocols/SocketEngineClient.html#/s:FP8SocketIO18SocketEngineClient18parseEngineMessageFSST_":{"name":"parseEngineMessage(_:)","abstract":"<p>Called when the engine has a message that must be parsed.</p>","parent_name":"SocketEngineClient"},"Protocols/SocketEngineClient.html#/s:FP8SocketIO18SocketEngineClient21parseEngineBinaryDataFV10Foundation4DataT_":{"name":"parseEngineBinaryData(_:)","abstract":"<p>Called when the engine receives binary data.</p>","parent_name":"SocketEngineClient"},"Protocols/WebSocketPongDelegate.html#/s:FP8SocketIO21WebSocketPongDelegate23websocketDidReceivePongFT6sockLine 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>"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO7connectA2EmF":{"name":"connect","abstract":"<p>Connect: 0</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO10disconnectA2EmF":{"name":"disconnect","abstract":"<p>Disconnect: 1</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5eventA2EmF":{"name":"event","abstract":"<p>Event: 2</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO3ackA2EmF":{"name":"ack","abstract":"<p>Ack: 3</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO5errorA2EmF":{"name":"error","abstract":"<p>Error: 4</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO11binaryEventA2EmF":{"name":"binaryEvent","abstract":"<p>Binary Event: 5</p>","parent_name":"PacketType"},"Structs/SocketPacket/PacketType.html#/s:8SocketIO0A6PacketV0C4TypeO9binaryAckA2EmF":{"name":"binaryAck","abstract":"<p>Binary Ack: 6</p>","parent_name":"PacketType"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV3nspSSv":{"name":"nsp","abstract":"<p>The namespace for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV2idSiv":{"name":"id","abstract":"<p>If > 0 then this packet is using acking.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4typeAC0C4TypeOv":{"name":"type","abstract":"<p>The type of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV6binarySay10Foundation4DataVGv":{"name":"binary","abstract":"<p>An array of binary data for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4dataSayypGv":{"name":"data","abstract":"<p>The data for this event.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV4argsSayypGv":{"name":"args","abstract":"<p>Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV11descriptionSSv":{"name":"description","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV5eventSSv":{"name":"event","abstract":"<p>The event name for this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket.html#/s:8SocketIO0A6PacketV12packetStringSSv":{"name":"packetString","abstract":"<p>A string representation of this packet.</p>","parent_name":"SocketPacket"},"Structs/SocketPacket/PacketType.html":{"name":"PacketType","abstract":"<p>The type of packets.</p>","parent_name":"SocketPacket"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7Elementa":{"name":"Element","abstract":"<p>Type of element stored.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5Indexa":{"name":"Index","abstract":"<p>Index type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8Iteratora":{"name":"Iterator","abstract":"<p>Iterator type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV11SubSequencea":{"name":"SubSequence","abstract":"<p>SubSequence type.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV10startIndexSiv":{"name":"startIndex","abstract":"<p>The start index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV8endIndexSiv":{"name":"endIndex","abstract":"<p>The end index of this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV7isEmptySbv":{"name":"isEmpty","abstract":"<p>Whether this collection is empty.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5countSiv":{"name":"count","abstract":"<p>The number of elements stored in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClientConfigurationV5firstAA0aC6OptionOSgv":{"name":"first","abstract":"<p>The first element in this collection.</p>","parent_name":"SocketIOClientConfiguration"},"Structs/SocketIOClientConfiguration.html#/s:8SocketIO0A21IOClLine truncated
|
||||
Reference in new issue
Block a user