作者: 992350020 时间: 2019-7-15 10:40
哎,还是自己解决了。如果在别的线程里使用send()函数,需要调用fdOpenSession(当前线程句柄) 和 fdCloseSession(当前线程句柄)。这两个函数应该是为send()函数授权一些资源使用的权限的。 详见NDK数据手册:The function returns the length of the data transmitted on successful completion. If a thread does not contain calls to fdOpenSession() and fdCloseSession(), the send() function returns a value of -1.作者: 广州创龙莫工 时间: 2019-7-17 13:40
感谢分享!作者: shxsxlh 时间: 2021-6-24 16:54
感谢分享调试经验,最近正要用NDK TCP实现板卡作为服务器运行。