| 901 | TSocketInput::~TSocketInput() = default; |
| 902 | |
| 903 | size_t TSocketInput::DoRead(void* buf, size_t len) { |
| 904 | const ssize_t ret = S_.Recv(buf, len); |
| 905 | |
| 906 | if (ret >= 0) { |
| 907 | return (size_t)ret; |
| 908 | } |
| 909 | |
| 910 | ythrow TSystemError(-(int)ret) << "can not read from socket input stream"; |
| 911 | } |
| 912 | |
| 913 | TSocketOutput::TSocketOutput(const TSocket& s) noexcept |
| 914 | : S_(s) |