summaryrefslogtreecommitdiff
path: root/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/transport_manager/src/tcp/tcp_transport_adapter.cc')
-rw-r--r--src/components/transport_manager/src/tcp/tcp_transport_adapter.cc36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
index 0e9e63263b..f475912401 100644
--- a/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
+++ b/src/components/transport_manager/src/tcp/tcp_transport_adapter.cc
@@ -2,6 +2,9 @@
* Copyright (c) 2017, Ford Motor Company
* All rights reserved.
*
+ * Copyright (c) 2018 Xevo Inc.
+ * All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@@ -13,7 +16,7 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the Ford Motor Company nor the names of its contributors
+ * Neither the name of the copyright holders nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -55,14 +58,35 @@ TcpTransportAdapter::TcpTransportAdapter(
const uint16_t port,
resumption::LastState& last_state,
const TransportManagerSettings& settings)
- : TransportAdapterImpl(NULL,
- new TcpConnectionFactory(this),
- new TcpClientListener(this, port, true),
- last_state,
- settings) {}
+ : TransportAdapterImpl(
+ NULL,
+ new TcpConnectionFactory(this),
+ new TcpClientListener(
+ this,
+ port,
+ true,
+ settings.transport_manager_tcp_adapter_network_interface()),
+ last_state,
+ settings) {}
TcpTransportAdapter::~TcpTransportAdapter() {}
+void TcpTransportAdapter::TransportConfigUpdated(
+ const TransportConfig& new_config) {
+ LOG4CXX_AUTO_TRACE(logger_);
+
+ transport_config_ = new_config;
+
+ // call the method of parent class to trigger OnTransportConfigUpdated() for
+ // the listeners
+ TransportAdapterImpl::TransportConfigUpdated(new_config);
+}
+
+TransportConfig TcpTransportAdapter::GetTransportConfiguration() const {
+ LOG4CXX_AUTO_TRACE(logger_);
+ return transport_config_;
+}
+
DeviceType TcpTransportAdapter::GetDeviceType() const {
return TCP;
}