标签: java macos sockets firewall serversocket
我正在使用套接字在本地进程之间进行通信。这会导致OSX防火墙提示:
Do you want the application "Foo.app" to accept incoming network connections?
我有两个问题:
代码:
new ServerSocket();
请注意,指定localhost或127.0.0.1不会阻止提示:
new ServerSocket(0, 0, InetAddress.getByName(null));