What exactly does "put" do on Server?

Richard Gaskin ambassador at fourthworld.com
Tue Apr 20 15:58:48 EDT 2021

Normally, HTTP is used for request-reply patterns, where the server 
receives the request, does some processing to it, and then sends back 
the reply.

In a faceless environment like Server, "put" goes to stdout, yes?  So 
when we say "put tData", then the contents of tData are handed back to 
Apache which then sends them along to the client.

So what happens when I have a script that uses multiple "put" statements?

Does LC Server buffer all "put" output together and send it as one 
string back to the client?

If so, why do I see faster results if I collect data myself and use only 
one "put"?

If not, how does it write a meaningful header, since the length can't be 
known in advance?

What exactly is the Server engine doing with "put"?

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  Ambassador at FourthWorld.com                http://www.FourthWorld.com

More information about the use-livecode mailing list