realpython / realpython/materials

BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately

未关闭
#119 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Jupyter Notebook
星标
5.2k
派生
5.3k
平均合并
4 天 10 小时
30 天内合并 PR
10

描述

When running the example multiconn-client and multiconn-server I get an error:

D:\git\PythonSocketProgramming\PythonSocketProgramming>python multiconn-client.py '127.0.0.1' 65432 1
starting connection 1 to ('127.0.0.1', 65432)
Traceback (most recent call last):
File "multiconn-client.py", line 60, in
start_connections( host, int(port), int(num_cons) )
File "multiconn-client.py", line 21, in start_connections
sock.connect( server_addr )
BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 multiconn-client.py 第 21 行开始,该行中 start_connections 调用 sock.connect(server_addr),并在 Windows 上复现针对 multiconn-server.py 显示的命令。确定非阻塞连接应如何完成,并定义使示例能够运行且不出现报告的 BlockingIOError 所需的更改。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
networking
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。