client and server example of libevent