You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying out starscream for the first time, but xcode is giving me trouble (6.1). On line 4 (the one that starts with 'class leadViewController') I get "Use of undeclared type 'WebsocketDelegate'".
import UIKit
import Starscream
class leadViewController: UIViewController, WebsocketDelegate {
var socket = WebSocket(url: NSURL(scheme: "ws", host: "192.168.2.56:1337", path: "/")!)
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
socket.delegate = self
socket.connect()
}
func websocketDidConnect() {
println("websocket is connected")
}
func websocketDidDisconnect(error: NSError?) {
println("websocket is disconnected: \(error!.localizedDescription)")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
The text was updated successfully, but these errors were encountered:
Trying out starscream for the first time, but xcode is giving me trouble (6.1). On line 4 (the one that starts with 'class leadViewController') I get "Use of undeclared type 'WebsocketDelegate'".
The text was updated successfully, but these errors were encountered: