socket.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:Intranet-Penetration 作者: yuxiaokui 项目源码 文件源码
def send(self, data, flags=0, timeout=timeout_default):
        sock = self._sock
        if timeout is timeout_default:
            timeout = self.timeout
        try:
            return sock.send(data, flags)
        except error, ex:
            if ex[0] != EWOULDBLOCK or timeout == 0.0:
                raise
            sys.exc_clear()
            try:
                wait_write(sock.fileno(), timeout=timeout, event=self._write_event)
            except error, ex:
                if ex[0] == EBADF:
                    return 0
                raise
            try:
                return sock.send(data, flags)
            except error, ex2:
                if ex2[0] == EWOULDBLOCK:
                    return 0
                raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号