Ale*_*lex 10 python sockets python-2.7
我有一个复杂的python(2.7.3)脚本,试图通过打开套接字连接
self.socket.close()
# doing something else
self.socket.connect((host, port))
Run Code Online (Sandbox Code Playgroud)
但我得到的是以下套接字错误:
error: [Errno 9] Bad file descriptor
Run Code Online (Sandbox Code Playgroud)
在host:port
我已经验证了这一点与接受连接nc host port
手动.那么我可能会因为打开与给定端口的连接而出现此错误的原因是什么呢?
我不能也不会发布完整的脚本,因为这个问题太复杂和无关紧要.我只是想知道这个错误的所有可能原因,以及如何检查和修复它们.
归档时间: |
|
查看次数: |
31064 次 |
最近记录: |