参考资料:
http://www.cnblogs.com/goodcandle/archive/2005/12/10/socket.html
http://www.2cto.com/net/201211/166537.html
http://sw1982.iteye.com/blog/460406
http://blog.csdn.net/yangzl2008/article/details/7366428
http://www.cppblog.com/tx7do/archive/2010/06/11/117609.html