Reading from Sockets

Jan Schenkel janschenkel at
Tue Apr 29 23:54:38 EDT 2008

--- rgould8 at wrote:
> If I have a webpage that has a link like this:
> <a href="">Talk to Rev</a>
> and while that webpage in Safari has that link
> clicked, I'd like to have Revolution lurking in the
> background waiting for that click, can someone tell
> me what I'd need to add to this script?
> on openCard
> ? open socket ""
> ? read from socket "" with message
> "gotdata"
> end openCard
> on gotdata
> ? answer "got data from the Safari webpage!"
> ? close socket ""
> end gotdata
> I'm just a little confused about whether I need to
> _continually_ do the "read socket" in a timer-loop,
> or if I can give it an infinite timeout.
> Right now, I don't get this to work at all, even
> when I click the link within 5 seconds, so I'm
> obviously missing something important.? 

You can find the old MetaCard HTTP server example at:

While it only supports the 'GET' method, it's a great
start for loearning how any socket-based server should
be built. RevOnRockets was inspired by it, as well as
several custom embedded web servers (I've built a few

Hope this helped,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution

"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

More information about the Use-livecode mailing list