Websocket ...

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Websocket ...

Post by gpb01 » Mon Sep 09, 2013 8:54 am

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

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Websocket ...

Post by BvG » Tue Sep 10, 2013 2:04 pm

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
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: Websocket ...

Post by gpb01 » Tue Sep 10, 2013 4:00 pm

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

Post Reply