因为要实现一个简单的网络服务性能测试工具,需要衡量TCP CONNECT环节耗时,发现目前网上对于python 2下的非阻塞connect/send/recv介绍很少,于是自己实现了一个
参考:
https://docs.python.org/2/howto/sockets.html#sockets
https://docs.python.org/2/howto/sockets.html#non-blocking-sockets
https://learnku.com/docs/pymotw/select-wait-for-io-efficiently/3429
https://stackoverflow.com/questions/8277970/what-are-possible-reason-for-socket-error-einprogress-in-solaris
https://www.cnblogs.com/MnCu8261/p/6403340.html
https://gist.github.com/hduffddybz/daa4c931f6ea0bd7ed93