Merge pull request #9 from yifan-gu/master

fix select timeout, add some macro
merge and fix duplicate send whohas
need modify the way GET packet is sent