blob: 86858a1d7df420e4db248d05c69216816716d21c [file] [log] [blame]
Benny Prijonoe0312a72005-11-18 00:16:43 +00001/* $Id */
Benny Prijonoe7224612005-11-13 19:40:44 +00002/*
Benny Prijonoe0312a72005-11-18 00:16:43 +00003 * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
Benny Prijonoe7224612005-11-13 19:40:44 +00004 *
Benny Prijonoe0312a72005-11-18 00:16:43 +00005 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
Benny Prijonoe7224612005-11-13 19:40:44 +00009 *
Benny Prijonoe0312a72005-11-18 00:16:43 +000010 * This program is distributed in the hope that it will be useful,
Benny Prijonoe7224612005-11-13 19:40:44 +000011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Benny Prijonoe0312a72005-11-18 00:16:43 +000012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Benny Prijonoe7224612005-11-13 19:40:44 +000018 */
Benny Prijono85d3f452005-11-09 15:37:19 +000019#include <pj++/file.hpp>
20#include <pj++/list.hpp>
21#include <pj++/lock.hpp>
22#include <pj++/hash.hpp>
23#include <pj++/os.hpp>
24#include <pj++/proactor.hpp>
25#include <pj++/sock.hpp>
26#include <pj++/string.hpp>
27#include <pj++/timer.hpp>
28#include <pj++/tree.hpp>
29
Benny Prijono12e13b72005-11-09 15:51:49 +000030class My_Async_Op : public Pj_Async_Op
31{
32};
33
34class My_Event_Handler : public Pj_Event_Handler
35{
36};
37
Benny Prijono85d3f452005-11-09 15:37:19 +000038int main()
39{
40 Pjlib lib;
41 Pj_Caching_Pool mem;
42 Pj_Pool the_pool;
43 Pj_Pool *pool = &the_pool;
44
45 the_pool.attach(mem.create_pool(4000,4000));
46
47 Pj_Semaphore_Lock lsem(pool);
48 Pj_Semaphore_Lock *plsem;
49
50 plsem = new(pool) Pj_Semaphore_Lock(pool);
51 delete plsem;
52
Benny Prijono12e13b72005-11-09 15:51:49 +000053 Pj_Proactor proactor(pool, 100, 100);
54
55 My_Event_Handler *event_handler = new(the_pool) My_Event_Handler;
56 proactor.register_socket_handler(pool, event_handler);
57 proactor.unregister_handler(event_handler);
58
Benny Prijono85d3f452005-11-09 15:37:19 +000059 return 0;
60}
61