comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: XML-HTML Forms local execution was RE: GNAT, LINUX, KDE
Date: 1999/11/27
Date: 1999-11-27T00:00:00+00:00	[thread overview]
Message-ID: <x7vvh6nok9v.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: 01bf38e6$27820850$022a6282@dieppe

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

"Pascal Obry" <pascal_obry@csi.com> writes:

> Robert C. Leif, Ph.D. <rleif@rleif.com> a �crit dans l'article
> <NBBBJNOMKDIAJALCEFIJKEMIDFAA.rleif@rleif.com>...
> > In order to be absolutely explicit, I have reproduced my form below.
> > The question is: How do I get the string named test into the Ada program,
> > HTML_Ada.exe? Is it via the command line or some other means?
> 
> Well this is quite trivial, when you know :-)

Pascal, I don't think it's as trivial as you think. Bob doesn't want
to write a CGI program, he wants to include the web server in his
application!

Bob, the browser is going to connect to a TCP socket on your computer
and send you requests in the form of text. I don't have a spec for
HTTP but I'm sure one can be found ..

You will need to be able to handle sockets, you'll need (the
equivalent of the UNIX) socket(), bind(), listen(), accept(), read(),
write() and close(). You may need select() too, unless your Ada
implementation will let you block on accept() in a separate task while
you carry on with the other work.

The only tip I'd pass on from my very very limited experience is to
read() the whole request from the accept()ed socket before close()ing
it (my initial test just sent the response back using write() without
bothering to see what the reauest was).

You then have to parse the request and handle it as required; write()
back any response; and close() the socket.




  parent reply	other threads:[~1999-11-27  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-22  0:00 GNAT, LINUX, KDE Robert C. Leif, Ph.D.
1999-11-23  0:00 ` David Botton
1999-11-23  0:00 ` Preben Randhol
1999-11-23  0:00   ` Vladimir Olensky
1999-11-23  0:00     ` David Botton
1999-11-24  0:00       ` tmoran
1999-11-24  0:00         ` Geoff Bull
1999-11-24  0:00           ` Robert C. Leif, Ph.D.
1999-11-25  0:00             ` David Botton
1999-11-26  0:00               ` Vladimir Olensky
1999-11-26  0:00                 ` Tarjei Jensen
1999-11-26  0:00                   ` Vladimir Olensky
1999-11-28  0:00                   ` tmoran
1999-11-28  0:00                   ` Aidan Skinner
1999-11-29  0:00                     ` Tarjei Jensen
1999-12-01  0:00                       ` Aidan Skinner
1999-12-08  0:00                       ` Jeffrey L Straszheim
1999-12-10  0:00                         ` Tarjei Jensen
1999-11-25  0:00             ` Geoff Bull
1999-11-27  0:00               ` XML-HTML Forms local execution was " Robert C. Leif, Ph.D.
1999-11-27  0:00                 ` David Botton
     [not found]                 ` <01bf38e6$27820850$022a6282@dieppe>
1999-11-27  0:00                   ` Simon Wright [this message]
1999-11-28  0:00                 ` tmoran
1999-11-28  0:00                 ` Vladimir Olensky
1999-11-29  0:00                 ` Alfred Hilscher
1999-11-25  0:00           ` tmoran
1999-11-24  0:00       ` Aidan Skinner
1999-11-29  0:00       ` GUI, XML,HTTP and ORBlets (Was Re: GNAT, LINUX, KDE) Vladimir Olensky
1999-11-29  0:00       ` GUI, HTTP and LynxOS ( Was:Re: " Vladimir Olensky
1999-11-29  0:00         ` Ted Dennison
1999-11-29  0:00           ` Ed Falis
1999-12-07  0:00             ` Mario Amado Alves
1999-12-08  0:00               ` GUI, HTTP and LynxOS Robert C. Leif, Ph.D.
1999-12-09  0:00                 ` Mario Amado Alves
1999-12-09  0:00                   ` tmoran
1999-12-11  0:00                   ` David Botton
1999-11-23  0:00     ` GNAT, LINUX, KDE Preben Randhol
1999-11-24  0:00       ` Vladimir Olensky
1999-11-24  0:00         ` Preben Randhol
1999-11-23  0:00   ` Robert C. Leif, Ph.D.
1999-11-24  0:00     ` Preben Randhol
1999-11-24  0:00       ` Robert C. Leif, Ph.D.
1999-11-25  0:00         ` Preben Randhol
1999-11-24  0:00 ` Aidan Skinner
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox