summaryrefslogtreecommitdiff
path: root/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/endpoints/src/virtual_server_endpoint_impl.cpp')
-rw-r--r--implementation/endpoints/src/virtual_server_endpoint_impl.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/implementation/endpoints/src/virtual_server_endpoint_impl.cpp b/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
index 5c8981c..e4441a9 100644
--- a/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
+++ b/implementation/endpoints/src/virtual_server_endpoint_impl.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -12,9 +12,9 @@ namespace vsomeip_v3 {
virtual_server_endpoint_impl::virtual_server_endpoint_impl(
const std::string &_address, uint16_t _port, bool _reliable,
- boost::asio::io_service& _service)
+ boost::asio::io_context &_io)
: address_(_address), port_(_port), reliable_(_reliable), use_count_(0),
- service_(_service) {
+ io_(_io) {
}
virtual_server_endpoint_impl::~virtual_server_endpoint_impl() {
@@ -23,10 +23,10 @@ virtual_server_endpoint_impl::~virtual_server_endpoint_impl() {
void virtual_server_endpoint_impl::start() {
}
-void virtual_server_endpoint_impl::prepare_stop(endpoint::prepare_stop_handler_t _handler,
+void virtual_server_endpoint_impl::prepare_stop(const endpoint::prepare_stop_handler_t &_handler,
service_t _service) {
auto ptr = shared_from_this();
- service_.post([ptr, _handler, _service]() {
+ io_.post([ptr, _handler, _service]() {
_handler(ptr, _service);
});
}
@@ -56,14 +56,6 @@ bool virtual_server_endpoint_impl::send(const byte_t *_data, uint32_t _size) {
return false;
}
-bool virtual_server_endpoint_impl::send(const std::vector<byte_t>& _cmd_header,
- const byte_t *_data, uint32_t _size) {
- (void)_cmd_header;
- (void)_data;
- (void)_size;
- return false;
-}
-
bool virtual_server_endpoint_impl::send_to(
const std::shared_ptr<endpoint_definition> _target,
const byte_t *_data, uint32_t _size) {
@@ -147,7 +139,7 @@ void virtual_server_endpoint_impl::restart(bool _force) {
}
void virtual_server_endpoint_impl::register_error_handler(
- error_handler_t _handler) {
+ const error_handler_t &_handler) {
(void)_handler;
}