Jump version number to 1.00 (due to SRU/W support)
[simpleserver-moved-to-github.git] / SimpleServer.pm
index ff1e62f..2fbaf7f 100644 (file)
@@ -25,7 +25,7 @@
 ##
 ##
 
-## $Id: SimpleServer.pm,v 1.20 2004-05-28 20:14:28 sondberg Exp $
+## $Id: SimpleServer.pm,v 1.23 2006-03-24 01:21:15 mike Exp $
 
 package Net::Z3950::SimpleServer;
 
@@ -39,7 +39,7 @@ require AutoLoader;
 
 @ISA = qw(Exporter AutoLoader DynaLoader);
 @EXPORT = qw( );
-$VERSION = '0.08';
+$VERSION = '1.00';
 
 bootstrap Net::Z3950::SimpleServer $VERSION;
 
@@ -95,6 +95,7 @@ package Net::Z3950::RPN::And;
 package Net::Z3950::RPN::Or;
 package Net::Z3950::RPN::AndNot;
 package Net::Z3950::RPN::Term;
+package Net::Z3950::RPN::RSID;
 package Net::Z3950::RPN::Attributes;
 package Net::Z3950::RPN::Attribute;
 
@@ -195,12 +196,12 @@ After the launching of the server, all control is given away from
 the Perl script to the server. The server calls the registered
 subroutines to field incoming requests from Z39.50 clients.
 
-A reference to an anonymous hash is passed to each handle. Some of
+A reference to an anonymous hash is passed to each handler. Some of
 the entries of these hashes are to be considered input and others
 output parameters.
 
-The Perl programmer specifies the event handles for the server by
-means of the the SimpleServer object constructor
+The Perl programmer specifies the event handlers for the server by
+means of the SimpleServer object constructor
 
   my $z = new Net::Z3950::SimpleServer(
                        INIT    =>      \&my_init_handler,
@@ -210,7 +211,22 @@ means of the the SimpleServer object constructor
                        SCAN    =>      \&my_scan_handler,
                        FETCH   =>      \&my_fetch_handler);
 
-After the custom event handles are declared, the server is launched
+If you want your SimpleServer to start a thread (threaded mode) to
+handle each incoming Z39.50 request instead of forking a process
+(forking mode), you need to register the handlers by symbol rather
+than by code reference. Thus, in threaded mode, you will need to
+register your handlers this way:
+
+  my $z = new Net::Z3950::SimpleServer(
+                       INIT    =>      "my_package::my_init_handler",
+                       CLOSE   =>      "my_package::my_close_handler",
+                       ....
+                       ....          );
+
+where my_package is the Perl package in which your handler is
+located.
+
+After the custom event handlers are declared, the server is launched
 by means of the method
 
   $z->launch_server("MyServer.pl", @ARGV);
@@ -220,6 +236,9 @@ script (for logging purposes), while the rest of the arguments
 are documented in the YAZ toolkit manual: The section on
 application invocation: <http://www.indexdata.dk/yaz/yaz-7.php>
 
+In particular, you need to use the -T switch to start your SimpleServer
+in threaded mode.
+
 =head2 Init handler
 
 The init handler is called whenever a Z39.50 client is attempting
@@ -372,10 +391,15 @@ node of one of the above types.
 
 See below for details.
 
+=item C<Net::Z3950::RPN::RSID>
+
+A reference to a result-set ID indicating a previous search.  The ID
+of the result-set is in the C<id> element.
+
 =back
 
 (I guess I should make a superclass C<Net::Z3950::RPN::Node> and make
-all of these subclasses of it.  Not done that yet, but will do soon.)
+all of these subclasses of it.  Not done that yet, but will do one day.)
 
 =back