| 924 | } |
| 925 | |
| 926 | void TSocketOutput::DoWrite(const void* buf, size_t len) { |
| 927 | size_t send = 0; |
| 928 | while (len) { |
| 929 | const ssize_t ret = S_.Send(buf, len); |
| 930 | |
| 931 | if (ret < 0) { |
| 932 | ythrow TSystemError(-(int)ret) << "can not write to socket output stream; " << send << " bytes already send"; |
| 933 | } |
| 934 | buf = (const char*)buf + ret; |
| 935 | len -= ret; |
| 936 | send += ret; |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | void TSocketOutput::DoWriteV(const TPart* parts, size_t count) { |
| 941 | const ssize_t ret = S_.SendV(parts, count); |