The Transmission Control Protocol (TCP) is one of the main communication protocols in the Internet, and it has been designed to provide an efficient reaction to packet loss events which are due to network congestion. Congestion is the main cause of losses in wired networks, but in today heterogeneous networks, loss events can also be introduced due to higher error rates on wireless channels, host mobility, and frequent handovers. Unfortunately, all packet losses are interpreted by TCP as a sign of congestion, triggering an inappropriate reaction which reduces its transmission rate and leads to performance degradation. In order to avoid this problem, it is important for TCP to correctly understand whether the reason of a packet loss is due to congestion or to a problem in the wireless link. This paper presents an innovative jitter-based cross-layer TCP algorithm, named XJTCP. It adopts the jitter ratio as loss predictor, joined with a layer two notification, in order to correctly infer the nature of a loss event. Performance evaluation and comparison with other common TCP implementations shows how XJTCP can be an interesting solution in the presence of wireless environments.