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
When I tried to run the sample project with just basics to connect web socket, getting this error -Disconnected with optional error : Optional(Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
@_exported import RxSwift
@_exported import RxStarscream
import Starscream
override func viewDidLoad() {
super.viewDidLoad()
private let disposeBag = DisposeBag()
socket = WebSocket(url: URL(string: "ws://localhost:8080/")!)
socket.connect()
socket.rx.response.subscribe(onNext: { (response: WebSocketEvent) in
switch response {
case .connected:
print("Connected")
case .disconnected(let error):
print("Disconnected with optional error : \(error)")
case .message(let msg):
print("Message : \(msg)")
case .data(_):
print("Data")
case .pong:
print("Pong")
}
}).disposed(by: disposeBag)
}
am I doing anything wrong, I could find the solution..
The text was updated successfully, but these errors were encountered:
When I tried to run the sample project with just basics to connect web socket, getting this error -Disconnected with optional error : Optional(Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused"
am I doing anything wrong, I could find the solution..
The text was updated successfully, but these errors were encountered: