Page 1 of 1

WebSocket connection with a node.js server

Posted: Fri Jul 19, 2019 11:25 pm
by TorstenHolmer
Hi,

I am working on a research project where I try to connect a mobile LiveCode client (Android) to a server which runs node.js.

As far as I found out, the client has to connect via WebSockets.

* Is there a possibility to use this protocol with Livecode?
* Are there any libraries which support WebSocket communication?
* Or there any hints on how to implement the protocol in Livecode?

Thanks in advance
Torsten

Re: WebSocket connection with a node.js server

Posted: Sat Jul 20, 2019 7:34 pm
by FourthWorld
I've looked into this, but only briefly. As with HTTP, it's all based on TCP and should be doable in LC, but with a fair amount of work.

I would be interested in learning if others have already written a library for this.

That said, it seems a limiting choice for the Node package you're using to require WebSockets only. There is no version or fork for traditional sockets?

Re: WebSocket connection with a node.js server

Posted: Sat Jul 20, 2019 9:43 pm
by TorstenHolmer
I think: no.

So I will try to find out how to write a library ;-)
At least I have to understand what the guys who wrote the socket.io did, but it seems a lot of work.
Maybe we find a way to talk on normal sockets instead of websockets...