我有一种情况,例如我必须在一个系统上虚拟创建 100 个 ip,其中每个 ip 将执行自己的请求响应任务。我已经在java中为单个真实IP编写了请求响应的应用程序。如何在系统上生成 100 个虚拟 ip 并为 java 中的每个 ip 绑定请求-响应?
问问题
257 次
1 回答
1
The maintenance of IP numbers is a task for the underlying operating system and there is no support for it in the standard java runtime. Hence if you want to do this you must invoke commands directly in the same way as you would if you were to do this personably by hand, and you must be authorized to do so by the operating system.
This strongly hints that you may be using the wrong tool for the job. Perhaps you should consider opening a new question describing what problem you really need to solve and ask for suggestions on how to design it?
于 2012-10-03T06:33:39.480 回答