implementation of select poll
deal with cross platform about reading event