Page 1 of 1

Web Socket

Posted: Fri Sep 23, 2016 10:44 pm
by Ultravibe
Hello!
Here is my new problem: i try to perform connection between javascript page on ios and livecode stack. I set up the proper ip and port data in javascript and accept connections on the same port at livecode. When ios app creates a web socket, livecode stack receives the "handshake" dialogue. After that, i parse it to find "sec-websocket-key". Then i append GUID to it and take a SHA-1. Then encode it in base64. After that i'm forming an "answer": reply to "handshake" and send it to ios javascript page. Here is the problem: how can i be sure that connection via web socket is established? And if not, how can i find the reason why it is not connecting?
May be some of you already experienced in such procedures - share with others - how it can be done?