TCP was designed to cope with packet loss due to congestion. Thus, it performs poorly in lossy environments, such as heterogeneous networks including wireless links. Standard TCP is unable to differentiate loss due to packet corruption from that due to network congestion. In this paper, a sender-side method of end-to-end loss differentiation and adaptive segmentation (Robin) is proposed, for enhancing TCP performance in heterogeneous networks. The loss differentiation algorithm enables the TCP sender to distinguish congestion losses from corruption losses. Moreover, the segmentation algorithm, according to the perceived congestion level of the network, improves the error recovery phase during a non-congestive period. The Robin scheme has been added to TCP-Westwood, a wellknown TCP variant recently proposed for wireless networks. Based on simulations of networks including a wireless link (Bluetooth), we show that Robin yields higher throughput in presence of errors on the radio link, whilst being friendly with other concurrent TCP connections in wired networks. In addition, since Robin involves changes only at the sender side without requiring changes of the receiver protocol stack or interception at intermediate nodes, it could be easily adopted in current Internet.