big improvements
1.add timeout feature for read and write
2.ignore SIGPIPE signal and caught EPIPE error in sendfile()
small tweaks