| 856 | } |
| 857 | |
| 858 | U32 KNativeSocketObject::writeNative(U8* buffer, U32 len) { |
| 859 | S32 result = (S32)::send(this->nativeSocket, (const char*)buffer, len, 0); |
| 860 | LOG_SOCK("native socket: %x writeNative len=%d result=%x", nativeSocket, len, result); |
| 861 | if (result>=0) { |
| 862 | this->error = 0; |
| 863 | return result; |
| 864 | } |
| 865 | std::shared_ptr< KNativeSocketObject> t = std::dynamic_pointer_cast<KNativeSocketObject>(shared_from_this()); |
| 866 | return handleNativeSocketError(t, true); |
| 867 | } |
| 868 | |
| 869 | U32 KNativeSocketObject::readNative(U8* buffer, U32 len) { |
| 870 | BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(readingCond); |
nothing calls this directly
no test coverage detected