HTTP adaptive streaming (HAS) is a streaming video technique widely used over the Internetfor Video on Demand (VoD) and Live streaming services. It employs Transmission Control Protocol(TCP) as transport protocol and it splits the original video inside the server into segments ofsame duration, called "chunks", that are transcoded into multiple quality levels. The HAS player,on the client side, requests for one chunk each chunk duration and it commonly selects the qualitylevel based on the estimated bandwidth of the previous chunk(s). Given that the HAS clients arelocated inside access networks, our investigation involves several HAS clients sharing the samebottleneck link and competing for bandwidth inside the same home network. Here, a degradationof both Quality of Experience (QoE) of HAS users and Quality of Service (QoS) of the accessnetwork are often recorded. The objective of this thesis is to optimize the TCP protocol in orderto solve both QoE and QoS degradations.Our first contribution consists of proposing a gateway-based shaping method, that we calledReceive Window Tuning Method (RWTM); it employs the TCP flow control and passive roundtrip time estimation on the gateway side. We compared the performances of RWTM with anothergateway-based shaping method that is based on queuing discipline, called Hierarchical TokenBucket shaping Method (HTBM). The results of evaluation indicate that RWTM outperformsHTBM not only in terms of QoE of HAS but also in terms of QoS of access network by reducingthe queuing delay and significantly reducing packet drop rate at the bottleneck.Our second contribution consists of a comparative evaluation between eight combinations thatresult from combining two shaping methods, RWTM and HTBM, and four very common TCPvariants, NewReno, Vegas, Illinois and Cubic. The results show that there is a significant discordancein performance between combinations. Furthermore, the best combination that improvesperformances in the majority of scenarios is when combining Illinois variant with RWTM. In addition,the results reveal the importance of an efficient updating of the slow start threshold value,ssthresh, to accelerate the convergence toward the best feasible quality level.Our third contribution consists of proposing a novel HAS-based TCP variant, that we called TcpHas; it is a TCP congestion control algorithm that takes into consideration the specificationsof HAS flow. Besides, it estimates the optimal quality level of its corresponding HAS flow basedon end-to-end bandwidth estimation. Then, it permanently performs HAS traffic shaping basedon the encoding rate of the estimated level. It also updates ssthresh to accelerate convergencespeed. A comparative performance evaluation of TcpHas with a recent and well-known TCPvariant that employs adaptive decrease mechanism, called Westwood+, was performed. Resultsindicated that TcpHas largely outperformsWestwood+; it offers better quality level stability on theoptimal quality level, it dramatically reduces the packet drop rate and it generates lower queuingdelay.