How to avoid a NoRouteToHostException?

后端 未结 6 1864
傲寒
傲寒 2020-12-02 06:09

Disclosure: the code I\'m working on is for university coursework.

Background: The task I\'m trying to complete is to report on the effect of different threading tec

6条回答
  •  既然无缘
    2020-12-02 06:29

    Cannot assign requested address is the error string for the EADDRNOTAVAIL error.

    I suspect you are running out of source ports. There are 16,383 sockets in the dynamic range available for use as a source port (see RFC 2780). 150 clients * 100 connections = 15,000 ports - so you are probably hitting this limit.

提交回复
热议问题