Questions tagged [starscream]

Starscream is a conforming WebSocket (RFC 6455) client library in Swift for iOS and OSX.

Starscream is a conforming WebSocket (RFC 6455) client library in Swift for iOS and OSX. It's Objective-C counter part can be found here: Jetfire

Features:

  • Conforms to all of the base Autobahn test suite.
  • Nonblocking. Everything happens in the background, thanks to GCD. TLS/WSS support.
  • Simple concise codebase at just a few hundred LOC.

Github project: https://github.com/daltoniam/Starscream

61 questions
0
votes
1 answer

Not able to connect Web Socket

I'm using "Swifter" as my local HTTP Server. I'm using "Starscream" for WebSockets. Unfortunately getting websocket is disconnected: Optional("The operation couldn’t be completed. (Starscream.WSError error 1.)")) when i'm trying to connect. I…
BAA
  • 55
  • 1
  • 6
0
votes
1 answer

Error "Timed out waiting for the socket to be ready for a write" while connecting to server in Xcode

I am trying to connect to server for web socket connection. but I am getting the error: "Websocket is disconnected: Optional(Starscream.WSError(type: Starscream.ErrorType.writeTimeoutError, message: \"Timed out waiting for the socket to be…
Jignesh Kanani
  • 223
  • 1
  • 4
  • 18
0
votes
2 answers

iOS websocket connection instant disconnects

I am trying to get a websocket connection between an iOS Client (iPad Air 2) and my C# Server. On iOS I'm using Starscream (https://github.com/daltoniam/Starscream) for websocket connections. But right after I successfully connect to my server, it…
Bryan
  • 23
  • 7
0
votes
0 answers

Starting a web socket server on iOS (with Starscream?)

I'm trying to build an iOS app that serves up frames from the camera over a web socket. Starscream seems to be the library of choice for web sockets on iOS. All the Starscream examples I can find (e.g. here or here) start with a line like this…
dumbledad
  • 16,305
  • 23
  • 120
  • 273
0
votes
1 answer

How to make a Singleton Manager Class of Starscream in Web-socket

How can i make a single class manager of starscream web sockets in swift. Kindly help me out how can i do that to get request and response just by managing singleton class manager. Because i want to use sockets over the app in many views and there…
0
votes
1 answer

Access variable of Viewcontroller in AppDelegate

As the question says, I am trying to access a variable of my ViewController inside my AppDelegate.swift. in func applicationWillTerminate(_ application: UIApplication){}, I want to access a WebSocket object inside my ViewController and do…
0
votes
1 answer

Can't connect Starscream WebSocket to Java ServerSocket

I have a Java server set-up for an app I'm making. The Java server takes new clients as they attempt to connect: //Continuously accept new user clients try(ServerSocket serverSocket = new ServerSocket(portNumber)){ …
Busman
  • 575
  • 2
  • 6
  • 14
0
votes
1 answer

Issues using Starscream with the Poloniex WAMP API

I'm trying to use Starscream (which is great) to connect to the Poloniex (cryptocurrency exchange) API to retrieve live quotes for prices over socket connection. I have been successful using Autobahn, in connecting and subscribing in Python. Now on…
Woodstock
  • 22,184
  • 15
  • 80
  • 118
0
votes
1 answer

Starscream Swift connecting to localhost socket does nothing

I am trying to connect to my localhost socket (which works fine) like this: import Starscream class ViewController: UIViewController { let conn = ConnectionManager() override func viewDidLoad() { super.viewDidLoad() …
Ryan Murphy
  • 163
  • 1
  • 12
0
votes
1 answer

iOS Framework Starscream can't connect when on device

I created a test app to connect using web sockets using the Starscream framework. It connects just fine on the simulator, but when I try it on the actual device, it fails and I get this error: 2017-07-26 08:59:01.638479-0700 poc[1769:361206] error =…
kailoon
  • 2,131
  • 1
  • 18
  • 33
0
votes
1 answer

Starscream: Updating pod create compilation error

I have installed Crashlyticsusing pod. pod 'Fabric' pod 'Crashlytics' But after updating the pod file Starscream 1.1.4 (was 1.1.1) also get updated. Now build the project shows me following error Can anyone help me how to solve it? Any…
Tapas Pal
  • 7,073
  • 8
  • 39
  • 86
-1
votes
1 answer

How to handle websocket "requests" and "responses" in Swift?

Imagine we have chat service with websocket. We are sending message as JSON with property request_id. Server catches our message, saves it to the DB and returns message's id by sending another data back to the client with passed request_id. Client…
atom-22
  • 181
  • 1
  • 13
-1
votes
2 answers

Is it possible to use Web Sockets with Apple Watch? For example using Starscream

Does Apple Watch support Web Sockets? Is it possible to use an external library like Starscream? https://github.com/daltoniam/Starscream
JackieNBee
  • 173
  • 3
  • 18
-2
votes
1 answer

Swift Cannot invoke initializer for type 'WebSocket' with an argument list of type '(url: URL)

I have following code in swift for web-socket communication, but when I build the code I am getting error. Code: import Foundation import Starscream class StarscreamWebSocket: WebSocketProvider { var delegate: WebSocketProviderDelegate? …
CodeDezk
  • 1,230
  • 1
  • 12
  • 40
-2
votes
2 answers

what are usage of ping and pong in websocket (starscream)

i'm working on a project which i need to use Websocket to exchange data with server and i was wondering what is usage of ping and pong in Websocket and what are them? Thanks
Alireza aj
  • 71
  • 1
  • 11