summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
blob: d81b70dfe8a53f6a0406b77eaf5763cd90feb22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** @page components_transportmanager_internal_design_transport_adapters_tcp_adapter TCP Adapter
 *
 * TCP adapter handles communication with remote devices via TCP/IP socket. It is implemented in
 * NsSmartDeviceLink::NsTransportManager::CTCPAdapter.
 *
 * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_listen Listening for connections
 *
 * TCP adapter creates listening TCP socket (TCP port is specified in NsSmartDeviceLink::NsTransportManager::CTCPAdapter::cTCPAdapterPort)
 * and listens for incoming connections. Devices are identified by their IP address.
 *
 * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_accept Accepting connection
 *
 * When TCP adapter accepts connection it checks if there is a device with IP address matching with IP address of accepted connection.
 * If there is no such device, then this device is added and device list is updated.
 *
 * @section components_transportmanager_internal_design_transport_adapters_tcp_adapter_disconnecting Disconnecting
 *
 * When socket gets disconnected TCP adapter checks if there is another opened connection for IP address of disconnected application.
 * If it was the last application from this IP address then device with this IP address is removed and devices list is updated.
 */