blob: 99b7f8d5c61f5bcde4bef673a965d7ecabe5b819 [file] [log] [blame]
Benny Prijono85d3f452005-11-09 15:37:19 +00001#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 Prijono12e13b72005-11-09 15:51:49 +000012class My_Async_Op : public Pj_Async_Op
13{
14};
15
16class My_Event_Handler : public Pj_Event_Handler
17{
18};
19
Benny Prijono85d3f452005-11-09 15:37:19 +000020int 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 Prijono12e13b72005-11-09 15:51:49 +000035 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 Prijono85d3f452005-11-09 15:37:19 +000041 return 0;
42}
43