Status checker for hundreds IP addresses

前端 未结 10 1518
长发绾君心
长发绾君心 2021-01-02 01:52

I wonder how to make a status checker, checking about 500 addresses in a few minutes? (it\'ll check a certain port if its listening).

But I care about the performanc

10条回答
  •  执笔经年
    2021-01-02 02:11

    They keyword in this is non-blocking. You would want to have a certain callback when an attempt is succesful and be able to run more calls in the meantime.

    Some functions like sockets from DaveRandom's answer allow for a non-blocking mode to do this in regular php installations. You can also use different programming languages such as node.js to do this very efficiently because they are designed to be non-blocking.

提交回复
热议问题