summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/doc/doxygen/components/TransportManager/Internal Design/Device Adapters/TCPAdapter.txt
blob: 2fbd835ec9ba4e603df2d49838f3b9344e4d04cb (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
 * ns_smart_device_link::ns_transport_manager::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 ns_smart_device_link::ns_transport_manager::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.
 */