MCPcopy Create free account
hub / github.com/COVESA/vsomeip / send_cbk

Method send_cbk

implementation/endpoints/src/local_endpoint.cpp:429–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429void local_endpoint::send_cbk(boost::system::error_code const& _ec, [[maybe_unused]] size_t _bytes, std::vector<uint8_t> _send_buffer) {
430 if (!_ec) {
431 std::scoped_lock const lock{mutex_};
432 if (state_ == state_e::CONNECTED) {
433 send_buffer_unlock();
434 } else {
435 VSOMEIP_WARNING_P << "Unexpected state " << status_unlock();
436 }
437
438 return;
439 }
440 if (_send_buffer.size() > 0) {
441 VSOMEIP_WARNING_P << "Error: " << _ec.message() << ", " << _send_buffer.size() << " bytes are dropped, " << status();
442 }
443
444 if (_ec != boost::asio::error::operation_aborted) {
445 VSOMEIP_WARNING_P << "Escalating the error: " << _ec.message() << ", " << status();
446 escalate();
447 return;
448 }
449 VSOMEIP_WARNING_P << "Not dealing with the error: " << _ec.message() << ", " << status();
450}
451
452[[nodiscard]] bool local_endpoint::process(size_t _new_bytes, std::unique_lock<std::mutex>& _lock) {
453 if (_new_bytes > 0 && !receive_buffer_->bump_end(_new_bytes)) {

Callers 3

send_buffer_unlockMethod · 0.95
send_queued_unlockedMethod · 0.45
send_queuedMethod · 0.45

Calls 2

messageMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected