Send Data/Text From iOS to Desktop App on LAN?

Mike Kerner MikeKerner at roadrunner.com
Wed Dec 19 16:31:25 EST 2012


I'm just thinking out loud at this point because I'm not messing with code
this very moment to try it.

The teacher wouldn't have to share their IP, necessarily.  The students'
app will know the ip address and could then fairly quickly send requests on
all addresses in that range (1-255) until they get the response from the
teacher's app, because the teacher's app will also know what address was
assigned to its device.  The teacher's app would respond with its address
and the students' app would now know the address.  This is where blocking
could be a problem, because if the students have to sit and wait on every
single address for a response, the app is going to crawl.

An alternative to this problem would be the external file server idea - the
teacher's app would post a file in dropbox with its address, and the
students would get the file from dropbox with the address in it.

When you don't have good socket support, you find weird ways around
communications problems...

HTTP client and server example code are available at RR's website or (I
believe) within the examples/documentation in LC itself.  The server code
is straightforward.  I have not messed with using LC as an http server with
a bunch of clients so I can't tell you how it would respond.  I would be
more worried about the blocking aspect.


On Wed, Dec 19, 2012 at 4:00 PM, JOHN PATTEN <johnpatten at me.com> wrote:

> Monte & Mike…
>
> I like the idea of the teacher not having to share their IP by using the
> mergeBonjour external.  Lame question, but the mergeExternal would work on
> a Windows desktop app too?  …I'm guessing the desktop app has to announce
> that it is available via bonjour and this is done with the external? And
> then, the clients can report out all available Bonjour connections, i.e.
>  John Patten's  MacBook, Other Teacher's MacBook, etc. Student then just
> picks the correct teacher which then gives the client the path to send data
> to the teacher's App (IP)…?
>
> Also Mike, can you elaborate on how I could use http between two LiveCode
> stacks?  Is this because HTTP is built into everything you essentially
> don't need the http server part and http can be used (post & get) if you
> know the address of the app you are trying to post or get from?
>
> For example, two stacks on the same LAN..
>
> Sender stack would do something like a...
>
> post fld "student response" to URL "
> 127.0.0.1/user/johnpatten/Documents/TeacherServerApp.rev" cd fld "student
> data"
>
> or if I was using mergeBonjour would it be something like…
>
> after sending call for apps broadcasting Bonjour, select and store the
> target app (IP) in tTargetTeacher
>
> post fld "student response" to URL
> tTargetTeacher/user/johnpatten/Documents/TeacherServerAPP.rev " cd vld
> "student data"
>
>
> I also have questions about the blocking aspect, but will wait until I get
> a handle on the http point :)
>
> Thanks for your patience!
>
> Much appreciated!
>
> John Patten
> SUSD
>
>
> On Dec 19, 2012, at 12:13 PM, Mike Kerner <MikeKerner at roadrunner.com>
> wrote:
>
> > John,
> > If you were to use http, the teacher would not have to set something up.
> > You would build the code right into the teacher's app and the students'
> > clients.  The only problem I see is that I believe that the http code in
> LC
> > is blocking, so if you had something flakey happen with the connection
> you
> > could lock up the apps.
> >
> > In this case forget the file transfer ideas as the response time will not
> > be fast enough for what you want.
> >
> > No matter what solution you choose, you would have to have a way to
> > discriminate against students that have the app that are on the network
> but
> > are not in the classroom.  That is not a network problem, though.
> >
> >
> >
> > On Wed, Dec 19, 2012 at 3:00 PM, Monte Goulding <
> monte at sweattechnologies.com
> >> wrote:
> >
> >>
> >> On 20/12/2012, at 6:42 AM, JOHN PATTEN <johnpatten at me.com> wrote:
> >>
> >>> 2. At the start of the lesson, click a button on their app which
> reports
> >> their IP to them witch they then share that with the students who
> record it
> >> in their iOS client.
> >>
> >> If you want to share IP like this then you don't need bonjour. Bonjour
> >> avoids this step and in the student app they just click on John Patten's
> >> MacBook. Much simpler in complex ed department networks.
> >>
> >> Cheers
> >>
> >> --
> >> Monte Goulding
> >>
> >> M E R Goulding - software development services
> >> mergExt - There's an external for that!
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >   and did a little diving.
> > And God said, "This is good."
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."



More information about the use-livecode mailing list