MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / send

Method send

common/memory-stream/memory-stream.cpp:222–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 return recv(iov->iov_base, iov->iov_len);
221 }
222 virtual ssize_t send(const void *buf, size_t count, int flags = 0) override {
223 if (_closed) ERROR_RETURN(ECANCELED, -1);
224 size_t n = rand() % 8 + 1;
225 if (n > count) n = count;
226 auto p = (const char*)buf;
227 _out.append(p, p + n);
228 return n;
229 }
230 virtual ssize_t send(const struct iovec *iov, int iovcnt, int flags = 0) override {
231 if (_closed) ERROR_RETURN(ECANCELED, -1);
232 while(!iov->iov_base || !iov->iov_len)

Callers 2

run_real_socketFunction · 0.45
~ExecutorImplMethod · 0.45

Calls 2

sendFunction · 0.85
appendMethod · 0.45

Tested by 1

run_real_socketFunction · 0.36