MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / send_i

Method send_i

tools/rtpsrelay/RelayHandler.cpp:229–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229ssize_t RelayHandler::send_i(const Element& out,
230 size_t& total_bytes)
231{
232 const int BUFFERS_SIZE = 2;
233 iovec buffers[BUFFERS_SIZE];
234 total_bytes = 0;
235
236 int idx = 0;
237 for (ACE_Message_Block* block = out.message_block.get(); block && idx < BUFFERS_SIZE; block = block->cont(), ++idx) {
238 buffers[idx].iov_base = block->rd_ptr();
239#ifdef _MSC_VER
240#pragma warning(push)
241 // iov_len is 32-bit on 64-bit VC++, but we don't want a cast here
242 // since on other platforms iov_len is 64-bit
243#pragma warning(disable : 4267)
244#endif
245 buffers[idx].iov_len = block->length();
246 total_bytes += buffers[idx].iov_len;
247#ifdef _MSC_VER
248#pragma warning(pop)
249#endif
250 }
251
252 return socket_.send(buffers, idx, out.address, 0);
253}
254
255VerticalHandler::VerticalHandler(const Config& config,
256 const std::string& name,

Callers

nothing calls this directly

Calls 3

getMethod · 0.45
lengthMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected