关于bind:bind-socket报EACCESPermission-denied错误

应用的端口是443端口。

通过apk运行bin文件中的bind socket办法,始终报EACCES (Permission denied)谬误。

查网上材料,根本解决办法都是加权限以及不在UI线程中运行连贯网络的局部,我按此批改了之后,都没有成果。

预计是因为端口号是443端口,是保留端口的缘故?

查bind的文档,针对此谬误的解释:

EACCES The address is protected, and the user is not the superuser.

间接运行此bin文件没有问题,是因为此时是superuser吧。
参考链接:
4 ways to fix bind permission denied in Linux

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理