Page 1 of 1

Websocket ...

Posted: Mon Sep 09, 2013 8:54 am
by gpb01
Hi,
before wasting time on futile attempts, because I have not found any RunRev documentation about, I would like to know if it's possible, from LiveCode, to connect to a "websocket server" (RFC 6455) to receive data in the form of JSON messages.

Someone has already had experience with this type of connection ? Is supported by LiveCode ? Any suggestion ?

Thanks in advance,

Guglielmo

Re: Websocket ...

Posted: Tue Sep 10, 2013 2:04 pm
by BvG
sure, possible on desktop. You'd need to implement the protocol yourself of course, using sockets, or by setting the httpHeaders.

Maybe not on mobile (no sockets as of summer '13), can't be sure without reading the whole specs.

read the dictionary:
httpHeaders
open socket
read from socket
write to socket
libURLSetCustomHTTPHeaders
libURLLastHTTPHeaders()
libURLLastRHHeaders()
load

Re: Websocket ...

Posted: Tue Sep 10, 2013 4:00 pm
by gpb01
BvG wrote:sure, possible on desktop. You'd need to implement the protocol yourself of course, using sockets, or by setting the httpHeaders.
...
:D :D :D ... exactly what I wanted to avoid ... you know the protocol http://tools.ietf.org/html/rfc6455 ??? :wink: ... I was hoping that "websocket" were already implemented in Livecode (... or in a library) ... :(

Guglielmo