Skip to content

Commit aa10eac

Browse files
committed
[Fixed ping pong issue in accordance with new protocol]
[Upgraded handyJson and starscream dependency] [Bumped up library version]
1 parent caafbb1 commit aa10eac

File tree

5 files changed

+17
-26
lines changed

5 files changed

+17
-26
lines changed

Package.resolved

Lines changed: 8 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ let package = Package(
1212
],
1313
dependencies: [
1414
// Dependencies declare other packages that this package depends on.
15-
.package(url: "https://github.com/daltoniam/Starscream.git", .exact("3.0.5")),
16-
.package(url: "https://github.com/alibaba/HandyJSON.git", .exact("4.2.0")),
15+
.package(url: "https://github.com/daltoniam/Starscream.git", .exact("3.1.1")),
16+
.package(url: "https://github.com/alibaba/HandyJSON.git", .exact("5.0.1")),
1717
],
1818
targets: [
1919
.target(

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pod 'ScClient'
3333
```swift
3434
dependencies: [
3535
// other dependencies
36-
.package(url: "https://github.com/sacOO7/ScClient", from: "1.0.8")
36+
.package(url: "https://github.com/sacOO7/ScClient", from: "2.0.0")
3737
]
3838
```
3939
- To use the library add this to target dependencies

ScClient.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "ScClient"
19-
s.version = "1.0.8"
19+
s.version = "2.0.0"
2020
s.summary = "A socketcluster client for iOS and OSX."
21-
s.swift_version = '3.2'
21+
s.swift_version = '4.0'
2222

2323
# This description is used to generate tags and improve search results.
2424
# * Think: What does it do? Why did you write it? What is the focus?
@@ -136,6 +136,6 @@ Pod::Spec.new do |s|
136136
s.requires_arc = true
137137

138138
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
139-
s.dependency "Starscream", "~> 3.0.5"
140-
s.dependency "HandyJSON", "~> 4.2.0"
139+
s.dependency "Starscream", "~> 3.1.1"
140+
s.dependency "HandyJSON", "~> 5.0.1"
141141
end

Sources/ScClient/client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public class ScClient : Listener, WebSocketDelegate {
4545
}
4646

4747
public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
48-
if (text == "#1") {
49-
socket.write(string: "#2")
48+
if (text == "") {
49+
socket.write(string: "")
5050
} else {
5151
if let messageObject = JSONConverter.deserializeString(message: text) {
5252
if let (data, rid, cid, eventName, error) = Parser.getMessageDetails(myMessage: messageObject) {

0 commit comments

Comments
 (0)