socketrocket

Xcode Mach-O Linker errors with 64-bit simulator

倾然丶 夕夏残阳落幕 提交于 2019-12-25 03:05:07
问题 I have been developing an iOS app in Xcode. It compiled and ran perfectly in the regular simulator, but when I switched the simulator device to 64-bit, it failed with 13 new warnings and 37 new errors, all of which are associated (I think) with an external library I'm using called ObjectiveDDP (https://github.com/boundsj/ObjectiveDDP). People had similar problems, but my understanding is they were supposedly fixed in a recently-released update to the framework, but on my end this update is to

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

依然范特西╮ 提交于 2019-12-20 02:29:45
问题 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 there anyway to keep the websocket connection alive, until I manually disconnect? 回答1: We need to ping the server intermittently (In my case, I do this in every 30 seconds), for avoiding to close the connection from the server side. - (void

SocketRocket After trying to install socketrocket so that I can make PonyDebugger work, I'm getting 3 Apple Match-O linker errors

北城余情 提交于 2019-12-18 21:55:16
问题 I'm getting the fllowing. It's my first time trying to install this and I have to since I need the Pony Debugger working. Undefined symbols for architecture i386: "_utf8_countTrailBytes", referenced from: _validate_dispatch_data_partial_string in libSocketRocket.a(SRWebSocket.o) "_utf8_nextCharSafeBody", referenced from: _validate_dispatch_data_partial_string in libSocketRocket.a(SRWebSocket.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1

Class is implemented in both. One of the two will be used

狂风中的少年 提交于 2019-12-17 16:11:51
问题 I have a project that has a dependency (installed via CocoaPods) using SocketRocket and have imported a static library from HeapAnalytics. Apparently the HeapAnalytics library already uses SocketRocket. I get no errors when compiling, but at runtime receive the following: Class SRWebSocket is implemented in both [path] and [path]. One of the two will be used. Which one is undefined. I'm not sure how to handle it because most solutions I've seen require compiling the static library yourself

Web Socket: cannot detect client connection on internet disconnect

半腔热情 提交于 2019-12-10 13:47:20
问题 I want to detect the client connection if client turn off the internet using web socket. My code is: //Include util library var util = require('util'); // Include underscore library var _ = require('underscore')._; //For websocket var webSocketServer = new (require('ws')).Server({port: (process.env.PORT || 5000)}), webSockets = {} // userID: webSocket // CONNECT /:userID // wscat -c ws://localhost:5000/1 webSocketServer.on('connection', function (webSocket) { var userID = webSocket.upgradeReq

SocketRocket and iOS certificate pinning

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 21:50:28
问题 I'm currently using SocketRocket as the WebSocket implementation for my iOS applications and would like to pin my server's CA as a trusted certificate with the SR_SSLPinnedCertificates property. I'm looking for a good example of loading one or more certificates to pass into SocketRocket. I've got the following code to work but I'm not sure it's correct or if there is a more straight-forward approach. CFArrayRef keyref = NULL; NSString *path = [[NSBundle mainBundle] pathForResource:@

SocketRocket and iOS certificate pinning

末鹿安然 提交于 2019-12-04 15:14:44
I'm currently using SocketRocket as the WebSocket implementation for my iOS applications and would like to pin my server's CA as a trusted certificate with the SR_SSLPinnedCertificates property. I'm looking for a good example of loading one or more certificates to pass into SocketRocket. I've got the following code to work but I'm not sure it's correct or if there is a more straight-forward approach. CFArrayRef keyref = NULL; NSString *path = [[NSBundle mainBundle] pathForResource:@"certificate" ofType:@"p12"]; NSData *data = [[NSData alloc] initWithContentsOfFile:path]; OSStatus status =

SocketRocket After trying to install socketrocket so that I can make PonyDebugger work, I'm getting 3 Apple Match-O linker errors

喜欢而已 提交于 2019-11-30 19:29:40
I'm getting the fllowing. It's my first time trying to install this and I have to since I need the Pony Debugger working. Undefined symbols for architecture i386: "_utf8_countTrailBytes", referenced from: _validate_dispatch_data_partial_string in libSocketRocket.a(SRWebSocket.o) "_utf8_nextCharSafeBody", referenced from: _validate_dispatch_data_partial_string in libSocketRocket.a(SRWebSocket.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) Any advice is very much appreciated! Thanks! EDIT: I added the SocketRocket

How to use SocketRocket with socket.io?

陌路散爱 提交于 2019-11-29 03:08:58
问题 The new iOS websocket library, SocketRocket, looks really awesome, and the chat example project is really sweet. The example chat server is written in Python, of which I know none. I'm slightly familiar with socket.io on node.js and prefer to try javascript. I tried connecting the SocketRocket TestChat simulator app to the node.js(6.10) socket.io(0.8.7) but the connection was refused. (Also, I'm not a node expert either, so this may be a silly question). In a recent answer to an SO question,