Socket question

Alex Tweedly alex at tweedly.net
Fri Aug 17 08:43:46 EDT 2012


Nothing significant has changed since 3.5

When you do your
    accept datagram connections on port tPort with message "myHandler"

there are, of course, no "connections" as such. All that happens is that 
myHandler will be called for each incoming packet.

See www.tweedly.org/downloads
and download the
   UDP echo server
   UDP echo client ...

(They should be on revOnline - but I can't find them there, so just get 
them direct from my site for now; I'll try again with revOnline later).

-- Alex.

On 17/08/2012 05:55, Paul D. DeRocco wrote:
> I'm still on Rev3.5, so I hope things haven't changed much.
>
> If I open a UDP datagram socket, how do I request it to read one datagram,
> regardless of how small or large it turns out to be? If I specify a "for"
> clause, does that just set an upper limit, or does it wait until enough
> datagrams have arrived to supply that many bytes? I'll be using the "with
> message" clause to make it asynchronous, if that makes a difference.
>
> If I had the datagram sender (which will be a C++ program in a Linux box)
> already written, I could find this out by trying it out, but I don't want to
> write the program at the other end and then find out that my idea won't work
> at all. So I'm hoping someone here has already played with UDP datagram
> sockets in Rev or LC, and already knows the answer.
>
> Thanks in advance.
>





More information about the use-livecode mailing list