Page 1 of 1

Sockets/Communications Question

Posted: Mon Apr 22, 2013 4:38 pm
by KennyR
I have been doing some looking at various threads trying to get an idea on how to get two programs to talk to each other for a simple program that does some light inventory tracking. Basically, I would like to be able to scan a barcode with a mobile device then have the item UPC be transmitted to the server program on a desktop or MAC in realtime. After looking at this thread http://forums.runrev.com/phpBB2/viewtop ... ets#p71668 , it appears that sockets are not available on mobile devices? Is this correct and if so, what other options should I pursue? Thanks everyone! Kenny

Re: Sockets/Communications Question

Posted: Tue Apr 23, 2013 2:08 am
by Simon
Hi Kenny,
I don't know what the server program looks like or how it communicates so I haven't a sure answer for you. But it is possible to upload to a database and maybe the server can communicate with that? Or just upload a file and have a local LC app on the desktop download and do the sockets stuff.

Simon

Re: Sockets/Communications Question

Posted: Tue Apr 23, 2013 2:14 am
by sturgis
Probably the easiest way would be to use a web server (apache, whatever) and as simon said, talk to that. You can use post

post myData to URL "http://whatever.address.com/script.to.read.the.data"

or a get URL string. Or you could indeed write your own server in livecode that can catch post or get data.. Might look at rev on rockets to see an example of an http server written in LC. Its single threaded, but if that will work for your purposes it works great.