MCPcopy Create free account
hub / github.com/davisking/dlib / send_data

Method send_data

dlib/bsp/bsp.cpp:473–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471// ----------------------------------------------------------------------------------------
472
473 void bsp_context::
474 send_data(
475 const std::vector<char>& item,
476 unsigned long target_node_id
477 )
478 {
479 using namespace impl2;
480 if (_cons[target_node_id]->terminated)
481 throw socket_error("Attempt to send a message to a node that has terminated.");
482
483 serialize(MESSAGE_HEADER, _cons[target_node_id]->stream);
484 serialize(current_epoch, _cons[target_node_id]->stream);
485 serialize(item, _cons[target_node_id]->stream);
486 _cons[target_node_id]->stream.flush();
487
488 notify_control_node(SENT_MESSAGE);
489 }
490
491// ----------------------------------------------------------------------------------------
492

Callers

nothing calls this directly

Calls 3

socket_errorClass · 0.85
serializeFunction · 0.70
flushMethod · 0.45

Tested by

no test coverage detected