<tfoot id='UxGEI'></tfoot>

<i id='UxGEI'><tr id='UxGEI'><dt id='UxGEI'><q id='UxGEI'><span id='UxGEI'><b id='UxGEI'><form id='UxGEI'><ins id='UxGEI'></ins><ul id='UxGEI'></ul><sub id='UxGEI'></sub></form><legend id='UxGEI'></legend><bdo id='UxGEI'><pre id='UxGEI'><center id='UxGEI'></center></pre></bdo></b><th id='UxGEI'></th></span></q></dt></tr></i><div id='UxGEI'><tfoot id='UxGEI'></tfoot><dl id='UxGEI'><fieldset id='UxGEI'></fieldset></dl></div>

        • <bdo id='UxGEI'></bdo><ul id='UxGEI'></ul>

        <small id='UxGEI'></small><noframes id='UxGEI'>

        <legend id='UxGEI'><style id='UxGEI'><dir id='UxGEI'><q id='UxGEI'></q></dir></style></legend>

        Python [Errno 98] 地址已在使用中

        Python [Errno 98] Address already in use(Python [Errno 98] 地址已在使用中)
        • <tfoot id='4lbxa'></tfoot>
            <bdo id='4lbxa'></bdo><ul id='4lbxa'></ul>
              <tbody id='4lbxa'></tbody>
              <legend id='4lbxa'><style id='4lbxa'><dir id='4lbxa'><q id='4lbxa'></q></dir></style></legend>

                <i id='4lbxa'><tr id='4lbxa'><dt id='4lbxa'><q id='4lbxa'><span id='4lbxa'><b id='4lbxa'><form id='4lbxa'><ins id='4lbxa'></ins><ul id='4lbxa'></ul><sub id='4lbxa'></sub></form><legend id='4lbxa'></legend><bdo id='4lbxa'><pre id='4lbxa'><center id='4lbxa'></center></pre></bdo></b><th id='4lbxa'></th></span></q></dt></tr></i><div id='4lbxa'><tfoot id='4lbxa'></tfoot><dl id='4lbxa'><fieldset id='4lbxa'></fieldset></dl></div>

                  <small id='4lbxa'></small><noframes id='4lbxa'>

                  本文介绍了Python [Errno 98] 地址已在使用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我的 Python 套接字程序中,有时我需要使用 Ctrl-C 来中断它.当我这样做时,它会使用 socket.close() 关闭连接.

                  In my Python socket program, I sometimes need to interrupt it with Ctrl-C. When I do this, it does close the connection using socket.close().

                  但是,当我尝试重新打开它时,我必须等待一分钟才能再次连接.如何正确关闭套接字?还是这是故意的?

                  However, when I try to reopen it I have to wait what seems like a minute before I can connect again. How does one correctly close a socket? Or is this intended?

                  推荐答案

                  是的,这是有意的.在这里你可以阅读详细解释.可以通过在套接字上设置 SO_REUSEADDR 选项来覆盖此行为.例如:

                  Yes, it is intended. Here you can read detailed explanation. It is possible to override this behavior by setting SO_REUSEADDR option on a socket. For example:

                  sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
                  

                  这篇关于Python [Errno 98] 地址已在使用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

                  • <bdo id='L5IGZ'></bdo><ul id='L5IGZ'></ul>

                    <small id='L5IGZ'></small><noframes id='L5IGZ'>

                        <tbody id='L5IGZ'></tbody>
                      <legend id='L5IGZ'><style id='L5IGZ'><dir id='L5IGZ'><q id='L5IGZ'></q></dir></style></legend>

                        <tfoot id='L5IGZ'></tfoot>

                          1. <i id='L5IGZ'><tr id='L5IGZ'><dt id='L5IGZ'><q id='L5IGZ'><span id='L5IGZ'><b id='L5IGZ'><form id='L5IGZ'><ins id='L5IGZ'></ins><ul id='L5IGZ'></ul><sub id='L5IGZ'></sub></form><legend id='L5IGZ'></legend><bdo id='L5IGZ'><pre id='L5IGZ'><center id='L5IGZ'></center></pre></bdo></b><th id='L5IGZ'></th></span></q></dt></tr></i><div id='L5IGZ'><tfoot id='L5IGZ'></tfoot><dl id='L5IGZ'><fieldset id='L5IGZ'></fieldset></dl></div>