Benny Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 1 | #include <pj++/file.hpp>
|
| 2 | #include <pj++/list.hpp>
|
| 3 | #include <pj++/lock.hpp>
|
| 4 | #include <pj++/hash.hpp>
|
| 5 | #include <pj++/os.hpp>
|
| 6 | #include <pj++/proactor.hpp>
|
| 7 | #include <pj++/sock.hpp>
|
| 8 | #include <pj++/string.hpp>
|
| 9 | #include <pj++/timer.hpp>
|
| 10 | #include <pj++/tree.hpp>
|
| 11 |
|
Benny Prijono | 12e13b7 | 2005-11-09 15:51:49 +0000 | [diff] [blame] | 12 | class My_Async_Op : public Pj_Async_Op
|
| 13 | {
|
| 14 | };
|
| 15 |
|
| 16 | class My_Event_Handler : public Pj_Event_Handler
|
| 17 | {
|
| 18 | };
|
| 19 |
|
Benny Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 20 | int main()
|
| 21 | {
|
| 22 | Pjlib lib;
|
| 23 | Pj_Caching_Pool mem;
|
| 24 | Pj_Pool the_pool;
|
| 25 | Pj_Pool *pool = &the_pool;
|
| 26 |
|
| 27 | the_pool.attach(mem.create_pool(4000,4000));
|
| 28 |
|
| 29 | Pj_Semaphore_Lock lsem(pool);
|
| 30 | Pj_Semaphore_Lock *plsem;
|
| 31 |
|
| 32 | plsem = new(pool) Pj_Semaphore_Lock(pool);
|
| 33 | delete plsem;
|
| 34 |
|
Benny Prijono | 12e13b7 | 2005-11-09 15:51:49 +0000 | [diff] [blame] | 35 | Pj_Proactor proactor(pool, 100, 100);
|
| 36 |
|
| 37 | My_Event_Handler *event_handler = new(the_pool) My_Event_Handler;
|
| 38 | proactor.register_socket_handler(pool, event_handler);
|
| 39 | proactor.unregister_handler(event_handler);
|
| 40 |
|
Benny Prijono | 85d3f45 | 2005-11-09 15:37:19 +0000 | [diff] [blame] | 41 | return 0;
|
| 42 | }
|
| 43 |
|