mUDPSocket = new MulticastSocket(PORT);
NetworkInterface eth0 = NetworkInterface.getByName("eth0");
mUDPSocket.setNetworkInterface(eth0);
看一下setNetworkInterface这个函数的注释
标签:安卓多,mUDPSocket,setNetworkInterface,NetworkInterface,网卡,数据包,eth0 From: https://blog.51cto.com/u_13893439/9269156