Benny Prijono | e0312a7 | 2005-11-18 00:16:43 +0000 | [diff] [blame] | 1 | /* $Id */
|
Benny Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame] | 2 | /*
|
Benny Prijono | e0312a7 | 2005-11-18 00:16:43 +0000 | [diff] [blame] | 3 | * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
|
Benny Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame] | 4 | *
|
Benny Prijono | e0312a7 | 2005-11-18 00:16:43 +0000 | [diff] [blame] | 5 | * 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 Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame] | 9 | *
|
Benny Prijono | e0312a7 | 2005-11-18 00:16:43 +0000 | [diff] [blame] | 10 | * This program is distributed in the hope that it will be useful,
|
Benny Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame] | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
Benny Prijono | e0312a7 | 2005-11-18 00:16:43 +0000 | [diff] [blame] | 12 | * 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 Prijono | e722461 | 2005-11-13 19:40:44 +0000 | [diff] [blame] | 18 | */
|
Benny Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 19 | #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 Prijono | 12e13b7 | 2005-11-09 15:51:49 +0000 | [diff] [blame] | 30 | class My_Async_Op : public Pj_Async_Op
|
| 31 | {
|
| 32 | };
|
| 33 |
|
| 34 | class My_Event_Handler : public Pj_Event_Handler
|
| 35 | {
|
| 36 | };
|
| 37 |
|
Benny Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 38 | int 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 Prijono | 12e13b7 | 2005-11-09 15:51:49 +0000 | [diff] [blame] | 53 | 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 Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 59 | return 0;
|
| 60 | }
|
| 61 |
|