| 749 | } |
| 750 | |
| 751 | int doFlushWrite(xsSocket xss) |
| 752 | { |
| 753 | int ret; |
| 754 | |
| 755 | ret = send(xss->skt, (char*)xss->writeBuf, xss->writeBytes, 0); |
| 756 | if (ret < 0) { |
| 757 | return -1; |
| 758 | } |
| 759 | |
| 760 | modInstrumentationAdjust(NetworkBytesWritten, ret); |
| 761 | |
| 762 | if (ret > 0) { |
| 763 | if (ret < xss->writeBytes) { |
| 764 | xss->writeBytes -= ret; |
| 765 | return -1; |
| 766 | } |
| 767 | xss->writeBytes -= ret; |
| 768 | xss->unreportedSent += ret; |
| 769 | } |
| 770 | |
| 771 | return 0; |
| 772 | } |
| 773 | |
| 774 | void xs_socket_suspend(xsMachine *the) |
| 775 | { |
no test coverage detected