哎,还是自己解决了。如果在别的线程里使用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.