| 822 | } |
| 823 | |
| 824 | bool 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 | |
| 839 | void KNativeSocketObject::waitForEvents(BOXEDWINE_CONDITION& parentCondition, U32 events) { |
| 840 | if (events & K_POLLIN) { |