## 6 Transport Layer  
Traditional transport layer protocols such as transmission control protocol (TCP) manage end-to-end delivery. The key ingredients of such functionality include flow and congestion control and error recovery [8], which, in the face of the changeable wireless medium and particularly the adaptive operations at lower layers discussed in preceding sections, are exposed to unique challenges. For example, TCP attributes unacknowledged datagrams to congestion; however, such an assumption is no longer valid when considering _IoT_ devices that switch to different frequencies when strong interference is detected in the current channel. Such adaptation could lead to momentary disruption of communication even if the path from the source to the destination is in fact congestion-free. Therefore, traffic control measures may prove futile or wasteful as this type of transmission failure cannot be remedied without understanding the underlying factors. This section reviews some of the studies aiming to solve this problem.  
A series of transport layer protocols is designed in [116]. These enhanced versions of TCP take into account the behavior of the fluctuation associated with spectrum-sensing activities. More specifically, the return time (RTT) and bandwidth are tracked to infer the state of a system including spectrum-sensing operations. Based on such inference, a set of rules is formulated to determine the window size of TCP. Simulation results then suggest that protocols with or without advanced rules universally outperforms traditional TCP and that the throughput is further improved with the implemented advanced features [116].  
TP-CRAHN, TCP adapted for _ad hoc_ network nodes with spectrum-sensing capability, is proposed in [117] in order to deal with disruptions caused by spectral availability variation and node mobility, together with two additional challenges, namely the route suspension caused by spectrum sensing and tradeoff between throughput and sensing accuracy [43, 117]. The strategy of [117] is to make spectrum-related events and parameters explicitly known to the TCP protocol. In contrast to [116], configuration details such as sensing duration and commencement times are exchanged during connection establishment. As a result, the source can control the data rate and congestion window based on spectrum-sensing arrangements to avoid packet loss and retransmission buffer overflow. Upon transmission suspension due to disruptive spectral events, nodes record the current operational state, which is used for calculating new transmission parameters once the frequency switch is completed. Hence, the resumed transmission is tuned based on previous settings, instead of starting with a clean slate, thus helping preserve performance. As a step further than [116], each node during normal communication collects the received signal strength (RSS) of acknowledgment packets from its next hop and compares the values with minimum device reception power. By applying such information to an estimation framework based on the Kalman filter [117], the mobility of nodes is predicted and the congestion window is limited as a precaution of probable disconnections [43].  
The mechanism described in [118] aims at performance optimization utilizing ongoing or historical connection records. It is assumed that characteristics of TCP connections can be stored by entities such as database servers or access points, and the information is available at the time of future connection establishment. Whenever a source attempts to build a connection, it first checks the database. If records matching the requested destinations are found, the corresponding configurations can be used so that thesource does not need to go through the phase of a slow start. When the spectral utilization and node mobility patterns are relatively steady or self-repeating, such a scheme can improve the efficiency of the TCP.