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

Method isWriteReady

source/kernel/knativesocket.cpp:824–837  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

822}
823
824bool KNativeSocketObject::isWriteReady() {
825 fd_set sready = {};
826 struct timeval nowait = { 0 };
827
828 FD_ZERO(&sready);
829 FD_SET(this->nativeSocket, &sready);
830
831 ::select(this->nativeSocket + 1, nullptr, &sready, nullptr, &nowait);
832 bool result = FD_ISSET(this->nativeSocket, &sready) != 0;
833 if (result) {
834 this->error = 0;
835 }
836 return result;
837}
838
839void KNativeSocketObject::waitForEvents(BOXEDWINE_CONDITION& parentCondition, U32 events) {
840 if (events & K_POLLIN) {

Callers 1

connectMethod · 0.95

Calls 1

selectFunction · 0.50

Tested by

no test coverage detected