python:rs, ws, es = select.select(inputs, [], []) --报错error 10022
昨晚折腾的1个多钟,直到3点多才睡,感觉自己也是热爱代码了,敲3个多钟一点也不累(其实是为了凌晨6点起来抢票回家了^_^)
练习python中select进行异步通信-防止socket。recv方法阻塞线程
rs, ws, es = select.select(inputs, [], []) --报错error 10022
http://blog.sina.com.cn/s/blog_6ffee9410100pqdt.html这篇博客的意思是socket连接时候没有绑定端口,所以就报错。
然而我检查了下我端口是有设定了
port =65098
host = "localhost"
我这个端口查了下不会发生端口冲突,这个localhost地址会映射到127.0.0.1
基于上面情况下百度的一大堆,发现找不到,想google但是ss又过期了。只能自己想办法解决了
看了网上找的关于select的例子,发现他们通常会将serverSocket添加到inputs队列中,而我的inputs初始化是空了直接做select方法的参数。
参数都是空了,select怎么可能监听有哪个socket是可以读了,这是逻辑问题,肯定要报错了。
解决办法:将serverSocket添加到inputs队列中再调用select.select(inputs, [], [])这个语句就不会报错了
python:rs, ws, es = select.select(inputs, [], []) --报错error 10022的更多相关文章
- postgresql shell发起select操作报错ERROR: relation "tablename" does not exist
最近安装了一套clourdera manager,其中hive元数据保存在postgresql中,因为今天想看一下hive的元数据信息,就登录了psql,连接到hive元数据库,发起select操作, ...
- python 3.5.2安装mysql驱动报错
python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...
- appium 与 selenium python解决python 'WebElement' object does not support indexing 报错问题问题
再用selenium编写测试脚本时,发现出现python 'WebElement' object does not support indexing 报错问题问题,再找一些解决方法时,发现Appium ...
- 【Elasticsearch】ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC 2017] with format [yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis]];
ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC ...
- Python selenium PO By.XPATH定位元素报错
Python selenium PO By.XPATH定位元素报错 如下代码经常报错: # 首页的“新建投放计划”按钮 new_ads_plan = (By.XPATH, "//*[tex ...
- zepplin0.7.2报错ERROR, exception: null, result: %text java.lang.NullPointerException的处理
zepplin0.7.2报错ERROR, exception: null, result: %text java.lang.NullPointerException的处理 问题描述: 使用zeppli ...
- mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
注:本文来源于< mysql5.7设置简单密码报错ERROR 1819 (HY000): Your password does not satisfy the current policy r ...
- mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法
本意向修改一个用户的密码,网上搜到的命令为如下 mysql> update user set password=password(“新密码”) where user=”用户名”; 执行后报错 E ...
- mybatis报错 Error instantiating interface com.atguigu.mybatis.dao.DepartmentMapper with invalid types () or values ()
mybatis报错 Error instantiating interface com.atguigu.mybatis.dao.DepartmentMapper with invalid types ...
随机推荐
- (并查集 贪心思想)Supermarket -- POJ --1456
链接: http://poj.org/problem?id=1456 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=82830#probl ...
- alpha七天冲刺计划(更新ing)
alpha七天冲刺计划 第一天: http://note.youdao.com/noteshare?id=ff0c24feec21b1d74a176a0d88815933 第二天: http://no ...
- Two ways to see predicates added by VPD or FGAC
http://www.bobbydurrettdba.com/2012/07/17/two-ways-to-see-predicates-added-by-vpd-or-fgac/ Two ways ...
- 【WinRT】让控件飞,WinRT 中实现 web 中的 dragable 效果
由于在 xaml 体系中,控件没有传统 WebForm 中的 Left.Top.Right.Bottom 这些属性,取而代之的是按比例(像 Grid)等等的响应布局.但是,传统的这些设置 Left.T ...
- ASP.NET MVC+Redis (准备工作)
今天准备更新这个项目的第二篇博客.有一点需要说明的是之前觉得用的是Asp.net的WebPage,经过查看微软的官方文档还有相关的博客,相比较而言使用起来需要安装一个自动工具WebMatrix可以很快 ...
- 开源且功能强大的C# 扩展方法类库Pure.Ext,包含1000+个拓展方法 (支持.Net Framework和.Net Core)
先上地址 Github: https://github.com/purestackorg/pure.ext Gitee: https://gitee.com/purestack/pure.ext 扩展 ...
- Winform 搭建http服务器
using System; using System.Collections; using System.IO; using System.Net; using System.Net.Sockets; ...
- 20164321 王君陶 Exp1 PC平台逆向破解
一.实践目标 本次实践的对象是一个名为pwn1的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字符串. 该程序同时包含另一个代码片段,getS ...
- 879. Profitable Schemes
There are G people in a gang, and a list of various crimes they could commit. The i-th crime generat ...
- 从 falcon api 中获取数据
import json import time import requests openfalcon = 'http://ip:port/api/v1' user = 'user' password ...