Socket Comm Followup - A couple of questions

Ken Ray kray at sonsothunder.com
Fri Apr 15 23:27:00 EDT 2005


A couple of questions for those who care about these kinds of things:

1) I noticed that in Alex's examples, after the "listener" gets the message
fired off after the "accept" has been triggered, the "read from socket"
command says "read from socket lSock until CR"... any reason to read only a
line of data at a time? If I am sending over lots of data, what's the
good/bad thing about reading it in all at once?

2) I noticed in the Rev docs under "open socket", there is a reference to an
"ID" parameter that is "an optional connection name for the socket and can
be any string", and has the example:

  open socket to "ftp.example.org:21|sendFiles"

Has anyone used this? And if so (or if not), how *would* one use this? And
does this form work with UDP as well as TCP?

3) When should one use UDP vs TCP? What are the ads/disads of each?

Thanks,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list