X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=SimpleServer.pm;h=02101f99b44031f4c161e8a2a4c01f8544615600;hp=f870558c24ad975474560fae90c64b2e89040325;hb=4956f4b56e38c33e1f1dc81819112a9ab6551334;hpb=a731fd6cf785bc627d387f1352f34cf8baafd260 diff --git a/SimpleServer.pm b/SimpleServer.pm index f870558..02101f9 100644 --- a/SimpleServer.pm +++ b/SimpleServer.pm @@ -1,5 +1,5 @@ ## -## Copyright (c) 2000-2004, Index Data. +## Copyright (c) 2000-2006, Index Data. ## ## Permission to use, copy, modify, distribute, and sell this software and ## its documentation, in whole or in part, for any purpose, is hereby granted, @@ -25,7 +25,7 @@ ## ## -## $Id: SimpleServer.pm,v 1.25 2006-04-19 12:38:49 mike Exp $ +## $Id: SimpleServer.pm,v 1.31 2006-12-27 12:24:50 sondberg Exp $ package Net::Z3950::SimpleServer; @@ -39,7 +39,7 @@ require AutoLoader; @ISA = qw(Exporter AutoLoader DynaLoader); @EXPORT = qw( ); -$VERSION = '1.02'; +$VERSION = '1.05'; bootstrap Net::Z3950::SimpleServer $VERSION; @@ -83,6 +83,12 @@ sub launch_server { if (defined($self->{SCAN})) { set_scan_handler($self->{SCAN}); } + if (defined($self->{SORT})) { + set_sort_handler($self->{SORT}); + } + if (defined($self->{EXPLAIN})) { + set_explain_handler($self->{EXPLAIN}); + } start_server(@args); } @@ -209,7 +215,8 @@ means of the SimpleServer object constructor SEARCH => \&my_search_handler, PRESENT => \&my_present_handler, SCAN => \&my_scan_handler, - FETCH => \&my_fetch_handler); + FETCH => \&my_fetch_handler, + EXPLAIN => \&my_explain_handler); If you want your SimpleServer to start a thread (threaded mode) to handle each incoming Z39.50 request instead of forking a process @@ -531,6 +538,7 @@ The parameters exchanged between the server and the fetch handler are OFFSET => nnn ## Record offset number REQ_FORM => "n.m.k.l"## Client requested format OID COMP => "xyz" ## Formatting instructions + SCHEMA => "abc" ## Requested schema, if any ## Handler response: @@ -541,6 +549,7 @@ The parameters exchanged between the server and the fetch handler are ERR_STR => "" ## Error string SUR_FLAG => 0 ## Surrogate diagnostic flag REP_FORM => "n.m.k.l"## Provided format OID + SCHEMA => "abc" ## Provided schema, if any }; The REP_FORM value has by default the REQ_FORM value but can be set to