This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/http/examples
2010-06-23 11:52:34 +01:00
..
pwp http package (only partially working) 2010-06-23 11:52:34 +01:00
calc.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_body.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_client.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_files.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_inetd http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_openid.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_pwp.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_threads.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
demo_xpce.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
README http package (only partially working) 2010-06-23 11:52:34 +01:00
stress_client.pl http package (only partially working) 2010-06-23 11:52:34 +01:00
stress_server.pl http package (only partially working) 2010-06-23 11:52:34 +01:00

This is a simple demo of the  HTTP server facilities, providing a simple
body and the three documented server instantiations.

---+ The server main programs are:

	$ demo_threads.pl :
	Run threaded server. Requires SWI-Prolog with thread-support.
	The server is started at port 3000 using server/0.  server/2
	allows to specify options. tm/0 provides a graphical display
	of the runing threads.  See source-file.

	$ demo_xpce.pl :
	Run XPCE-based event-driven server.  Requires XPCE.  Use
	?- server(3000). to start the server at port 3000.

	$ demo_inetd :
	To install this, adjust the first line of this file to point
	to the installed Prolog executable and add the following line
	to /etc/inetd.conf (adjust as needed):

	4001 stream tcp nowait nobody /usr/sbin/tcpd /usr/lib/pl-5.1.4/library/http/demo/demo_inetd

---+ Session management demo:

	$ calc.pl :
	Multi-threaded server with session management using the
	html_write.pl library.  See source for usage.

---+ File serving demo:

	$ demo_files.pl :
	Is a multi-threaded server that serves static files and
	directory indices.

---+ Client demo

	$ demo_client.pl :
	Simple multi-threaded client to test the server under
	different conditions.  Requires SWI-Prolog with thread-support.
	See source for usage.

---+ Performance testing

A very early start of some  routines   to  validate the server platform.
Eventually, stress_server.pl will serve different   tests  from multiple
locations  and  stress_client.pl  will  contain    client  code  to  run
individual tests as well as doing multi-threaded tests.

	$ stress_server.pl :
	Server platform.

	$ stress_client.pl :
	Client.