communcation by select and libevent