| 867 | } |
| 868 | |
| 869 | U32 KNativeSocketObject::readNative(U8* buffer, U32 len) { |
| 870 | BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(readingCond); |
| 871 | S32 result = (S32)::recv(this->nativeSocket, (char*)buffer, len, 0); |
| 872 | |
| 873 | LOG_SOCK("%x native socket: %x readNative len=%d result=%x", KThread::currentThread()->id, nativeSocket, len, result); |
| 874 | if (result>=0) { |
| 875 | this->error = 0; |
| 876 | return result; |
| 877 | } |
| 878 | std::shared_ptr< KNativeSocketObject> t = std::dynamic_pointer_cast<KNativeSocketObject>(shared_from_this()); |
| 879 | return handleNativeSocketError(t, false); |
| 880 | } |
| 881 | |
| 882 | U32 KNativeSocketObject::stat(KProcess* process, U32 address, bool is64) { |
| 883 | KSystem::writeStat(process, B(""), address, is64, 1, 0, K_S_IFSOCK|K__S_IWRITE|K__S_IREAD, 0, 0, 4096, 0, 0, 1); |
nothing calls this directly
no test coverage detected