MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / writeNative

Method writeNative

source/kernel/knativesocket.cpp:858–867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858U32 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
869U32 KNativeSocketObject::readNative(U8* buffer, U32 len) {
870 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(readingCond);

Callers

nothing calls this directly

Calls 1

handleNativeSocketErrorFunction · 0.85

Tested by

no test coverage detected