net application samples based on libevent