Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Scaledrone.swift #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scaledrone-swift/Scaledrone.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class Scaledrone: WebSocketDelegate {

// MARK: Websocket Delegate Methods.

public func websocketDidConnect(socket: WebSocketClient) {
public func websocketDidConnect(socket: WebSocket) {
var msg = [
"type": "handshake",
"channel": self.channelID,
Expand All @@ -94,11 +94,11 @@ public class Scaledrone: WebSocketDelegate {
self.send(msg)
}

public func websocketDidDisconnect(socket: WebSocketClient, error: Error?) {
public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
delegate?.scaledroneDidDisconnect(scaledrone: self, error: error)
}

public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
var dic = convertJSONMessageToDictionary(text: text)

if let error = dic["error"] as? String {
Expand Down Expand Up @@ -177,7 +177,7 @@ public class Scaledrone: WebSocketDelegate {
room.delegate?.scaledroneRoomDidReceiveMessage(room: room, message: messageDic["message"] as Any, member: member)
}

public func websocketDidReceiveData(socket: WebSocketClient, data: Data) {
public func websocketDidReceiveData(socket: WebSocket, data: Data) {
print("Should not have received any data: \(data.count)")
}

Expand Down