Re-implementation of memcached in C++ without libevent