W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2000

FW: Post question.

From: Yaniv Ben-Yosef <yaniv@contact.com>
Date: Mon, 1 May 2000 11:49:57 +0200
To: <www-lib@w3.org>
Message-ID: <000c01bfb352$9c6506e0$1344a8c0@yaniv>
Hi Brian,

What you're actually saying is that you want to perform a _synchronous_
operation. You can do that very easily if you use blocking sockets, instead
of the default, which is nonblocking sockets. If you do that, the program
will hold until the post is finished, and you won't need an event loop at
On the other hand, you have to ask yourself if this is really what you want
to do. Usually when writing a professional program you would want to use
asynchronous operations with nonblocking sockets, because the time it may
take to perform the request is unperdicatable, and you would still like to
control your program (for example, if you want to let the user cancel the
Hope this helps,

Yaniv Ben-Yosef
Contact Networks http://www.contact.com

  -----Original Message-----
  From: www-lib-request@w3.org [mailto:www-lib-request@w3.org]On Behalf Of
Brian Svihovec
  Sent: Monday, May 01, 2000 6:26 AM
  To: www-lib@w3.org
  Subject: Post question.

  In the example programs for posting form data to a server, the program
begins the post and then enters the event loop.  When this operation is done
the termination function is called and the program is exited from there.

  I would like to write a function that will perform a post, and when it is
done, it will return control to the original calling function.  Is there a
way to have the event loop exit, and then have control returned back to the
original calling function instead of exiting the entire program?  (ex. main
calls MyPost and when MyPost is done it returns to main?)

Received on Monday, 1 May 2000 04:54:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:52 UTC