X-Git-Url: http://git.indexdata.com/?p=simpleserver-moved-to-github.git;a=blobdiff_plain;f=ztest.pl;h=10ca66766b03305a40f9a09346bd962afc564e6a;hp=9ecb4d9f11e9beba83a0a70b358cf19fdfb04a1d;hb=bbae3fcc7f1b9cf30cbfdd1ab3d7784b618ad6cc;hpb=8515053344b19f94fbca1a6bda7c2fb7b2a40bec diff --git a/ztest.pl b/ztest.pl index 9ecb4d9..10ca667 100755 --- a/ztest.pl +++ b/ztest.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w ## This file is part of simpleserver -## Copyright (C) 2000-2011 Index Data. +## Copyright (C) 2000-2013 Index Data. ## All rights reserved. ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions are met: @@ -54,7 +54,7 @@ sub my_init_handler { if (defined($args->{PASS}) && defined($args->{USER})) { printf("Received USER/PASS=%s/%s\n", $args->{USER},$args->{PASS}); } - + } @@ -101,7 +101,7 @@ sub my_scan_handler { my $_fail_frequency = 0; my $_counter = 0; -sub my_search_handler { +sub my_search_handler { my $args = shift; my $data = [{ @@ -169,9 +169,15 @@ sub my_fetch_handler { } } +sub my_start_handler { + my $args = shift; + my $config = $args->{CONFIG}; +} + Net::Z3950::SimpleServer::yazlog("hello"); -my $handler = new Net::Z3950::SimpleServer( +my $handler = new Net::Z3950::SimpleServer( + START => "main::my_start_handler", INIT => "main::my_init_handler", SEARCH => "main::my_search_handler", SCAN => "main::my_scan_handler",