IPv6 Socket on Android

孤人 提交于 2019-12-03 06:39:59

Since your IP Address is link local, perhaps it MUST be created with a scope ID or Interface so that the OS knows what interface to bind it to. As for specifying the scope_id, the Android docs seem somewhat lacking. The Oracle docs here indicate that the scope ID is system specific and cannot be determined programmatically.

So, I would try using the alternate factory method where you explicitly specify the NetworkInterface you wish to use. See here for details. There are methods in the NetworkInterface class to discover what interfaces exist on the system.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!