Sockets/Communications Question

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Sockets/Communications Question

Post by KennyR » Mon Apr 22, 2013 4:38 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Sockets/Communications Question

Post by Simon » Tue Apr 23, 2013 2:08 am

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Sockets/Communications Question

Post by sturgis » Tue Apr 23, 2013 2:14 am

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.

Post Reply