MCPcopy Create free account
hub / github.com/ml-explore/mlx / recv

Method recv

mlx/distributed/utils.cpp:150–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void TCPSocket::recv(const char* tag, void* data, size_t len) {
151 while (len > 0) {
152 auto n = ::recv(sock_, data, len, 0);
153 if (n <= 0) {
154 std::ostringstream msg;
155 msg << tag << " Recv failed with errno=" << errno;
156 throw std::runtime_error(msg.str());
157 }
158 len -= n;
159 data = static_cast<char*>(data) + n;
160 }
161}
162
163TCPSocket TCPSocket::connect(
164 const char* tag,

Callers

nothing calls this directly

Calls 1

recvFunction · 0.70

Tested by

no test coverage detected