2 * Copyright (c) 1998-1999, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
6 * $Log: yaz-proxy-main.cpp,v $
7 * Revision 1.7 1999-12-06 13:52:45 adam
8 * Modified for new location of YAZ header files. Experimental threaded
11 * Revision 1.6 1999/11/10 10:02:34 adam
14 * Revision 1.5 1999/04/21 12:09:01 adam
15 * Many improvements. Modified to proxy server to work with "sessions"
18 * Revision 1.4 1999/04/09 11:46:57 adam
19 * Added object Yaz_Z_Assoc. Much more functional client.
21 * Revision 1.3 1999/02/02 14:01:21 adam
22 * First WIN32 port of YAZ++.
24 * Revision 1.2 1999/01/28 13:08:45 adam
25 * Yaz_PDU_Assoc better encapsulated. Memory leak fix in
26 * yaz-socket-manager.cc.
28 * Revision 1.1.1.1 1999/01/28 09:41:07 adam
29 * First implementation of YAZ++.
34 #include <yaz/options.h>
36 #include <yaz-socket-manager.h>
37 #include <yaz-pdu-assoc.h>
38 #include <yaz-proxy.h>
40 void usage(char *prog)
42 fprintf (stderr, "%s: [-v log] [-t target] @:port\n", prog);
47 int args(Yaz_Proxy *proxy, int argc, char **argv)
54 while ((ret = options("t:v:", argv, argc, &arg)) != -2)
67 proxy->set_proxyTarget(arg);
70 log_init_level (log_mask_str(arg));
89 int main(int argc, char **argv)
91 Yaz_SocketManager mySocketManager;
92 Yaz_Proxy proxy(new Yaz_PDU_Assoc(&mySocketManager));
94 args(&proxy, argc, argv);
95 while (mySocketManager.processEvent() > 0)