Questions tagged [socketrocket]

For questions related to SocketRocket, a WebSocket client for Objective-C

SocketRocket is an open-source WebSocket client for Objective-C.

For more information, see this paper or visit the git-hub site

79 questions
4
votes
1 answer

iOS Client connecting to server using socketrocket results in "Stream end encountered"

NSString *urlString = @"ip address"; self.webSocket = [[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]]; self.webSocket.delegate = self; [self.webSocket open]; Here didCloseWithCode is called…
Hari
  • 101
  • 10
4
votes
2 answers

SocketRocket connection pausing while in background

I am using SocketRocket, but I cannot get it to deliver messages while in the background. When I open the app again, it resumes the connection (without reconnecting) and the messages all come in at once. Here is my connection code: -…
Jason Silberman
  • 2,471
  • 6
  • 29
  • 47
4
votes
1 answer

iOS Client connecting to NodeJS socket.io results in Stream end encountered

I have a NodeJS server that uses socket.io and listen to port 8000. The code is something like this: var io = require("socket.io"); var socket = io.listen(8000); ... socket.sockets.on("connection", function(client) { util.log("Client connects:…
Kevin Le - Khnle
  • 10,579
  • 11
  • 54
  • 80
3
votes
0 answers

Received invalid Sec-WebSocket-Accept response

I'm trying to connect to lichess web socket server with a very typical piece of code: let request = NSMutableURLRequest(url: URL(string: "wss://socket.lichess.org/")!) self.webSocket = SRWebSocket(urlRequest: request as URLRequest!) …
Alexander Perechnev
  • 2,797
  • 3
  • 21
  • 35
3
votes
2 answers

WebSockets client for iOS 9 SDK Objective-C

Could any one suggest the best way to implement web sockets in iOS. I need to build using base sdks iOS 9 or above. Found her web socket client for iOS. (https://github.com/square/SocketRocket). Also read a thread on this here…
Govind
  • 2,337
  • 33
  • 43
3
votes
2 answers

SRWebsocket connection is closing automatically after keeping app idle for sometime in iOS

I am using SRWebSocket to open a websocket connection in iOS. But if I am keeping the application idle for sometimes, the connection is closing automatically. After that when I am trying to send any data, the websocket connection is failing. Is…
Nobin Thomas
  • 181
  • 11
3
votes
1 answer

Why do client websocket close codes not match the server code?

I have a Spring Boot Tomcat server that is handling websocket connections from clients that are using: SocketRocket Tyrus I find that the close code provided by the server is often not the close code read by the client. For SocketRocket, I close…
mattm
  • 5,851
  • 11
  • 47
  • 77
3
votes
3 answers

Error in opening .xcworkspace

I integrated pods in my project specifically SignalR, AFNetworking and SocketRocket. It was successfully installed, but when I opened .xcworkspace, this error shows: Has anyone encountered this kind of error? Thanks in advance. Update: My…
Apple Ramos
  • 265
  • 3
  • 13
3
votes
2 answers

SocketRocket RunLoop sporadic crash

So our app has been experiencing crashes for a while in SocketRocket. We get about 20 crashes a day from it, with the following stack trace: Crashed: com.apple.root.default-overcommit-priority EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000c…
Erhannis
  • 4,256
  • 4
  • 34
  • 48
3
votes
0 answers

iOS SocketRocket and Long-Polling

Has anyone used SocketRocket in a scenario where they also needed to fallback to long-polling? If so does SocketRocket have any support for this scenario? Do you have any details or ideas for this kind of situation from the native iOS client side?
Todd Hopkinson
  • 6,803
  • 5
  • 32
  • 34
2
votes
1 answer

IOS swift Web Socket SRWebSocket set response timeout

I am using SRWebSocket/SocketRocket library in my app I am unable to set response timeout for it . I want to show a message if socket does not receive any data after few seconds Following is my code socketRocket = SRWebSocket(url: URL(string:…
amodkanthe
  • 4,345
  • 6
  • 36
  • 77
2
votes
1 answer

SocketRocket (iOS) : How to identify whom user are chatting with another?

I would like to create multiple sockets between all users. So how can i pass key and ID such as the server is divided in seprated windows. Thank You.
2
votes
0 answers

Why does my websocket server always report [websocket: control frame length > 125]?

My iOS application uses SocketRocket to establish a connection with my websocket server. But after establishing a connection and sending the first message, the server (using gorilla/websocket) tries to parse the frame, but failed: message_type, r,…
NeoWang
  • 17,361
  • 24
  • 78
  • 126
2
votes
1 answer

Implementin SRWebSocketDelegate in Swift

I am implementing: @protocol SRWebSocketDelegate - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message; @optional - (void)webSocketDidOpen:(SRWebSocket *)webSocket; - (void)webSocket:(SRWebSocket *)webSocket…
Karismo
  • 21
  • 1
2
votes
2 answers

Adding SocketRocket to a Swift project through Pods

I'm trying to add the SocketRocket framework to my Swift project using pods and I haven't been able to get the import to work on the Swift side. I added the following entry to the Podfile: pod 'SocketRocket', '0.2.0' And ran pod install. Then…
x89a10
  • 681
  • 1
  • 8
  • 23