【问题标题】:In case of poco when we create SecureServerSocket what happens id port is already in use?如果是 poco,当我们创建 Secure ServerSocket 时,如果端口已在使用中会发生什么?
【发布时间】:2020-03-18 07:09:31
【问题描述】:

SecureServerSocket(some port); 如果端口不可用会怎样? 我找不到任何关于相同的文件

【问题讨论】:

    标签: c++ poco poco-libraries


    【解决方案1】:

    很可能会抛出 NetException "Address already in use"

    这不是 SecureServerSocket 独有的,而是所有 Poco 套接字所独有的。

    由于低级OS套接字bind函数发生错误而产生。

    ERRNO 将设置为 EADDRINUSE,Poco 将检测到并抛出 NetException。

    我并没有在文档中具体看到 Socket 在构建时(或任何时间)抛出的 NetExceptions。

    SocketImpl.cpp

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-13
      • 2023-04-07
      • 1970-01-01
      • 2021-12-31
      • 2012-11-24
      • 1970-01-01
      • 2013-06-21
      相关资源
      最近更新 更多