lzqh / platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

based of reactor design form event platform

This is a simple implementation of reactor which use epoll as the event multiplexer and the min-heap as the manage container of timed-task. If you want to use it in industrial environment, i think the "ACE" is best solution.

You can compile the code by using the following shell command:

g++ -o reactor_server reactor_server_test.cc event_demultiplexer.cc reactor.cc global.cc g++ -o reactor_client reactor_client_test.cc event_demultiplexer.cc reactor.cc global.cc

After that, two executable programs will be made.

You can use them in this way:

./reactor_server 127.0.0.1 6852 ./reactor_client 127.0.0.1 6852

g++ -o reactor_server server.cpp demultiplexer.cpp reactor.cpp g++ -o reactor_client client.cpp demultiplexer.cpp reactor.cpp

About

License:GNU General Public License v3.0


Languages

Language:C++ 92.8%Language:C 7.2%