With the advent of home networking and widespread deployment of broadband connectivity to homes, a wealth of new services with real-time Quality of Service (QoS) requirements have emerged, e.g., Video on Demand (VoD), IP Telephony, which have to co-exist with traditional non-real-time services such as Web browsing and file downloading over the Transmission Control Protocol (TCP). The co-existence of such real-time and non-real-time services demands the residential gateway (RG) to employ bandwidth management algorithms to control the amount of non-real-time TCP traffic on the broadband access link from the Internet Service Provider (ISP) to the RG so that the bandwidth requirements of the real-time traffic are satisfied. In this paper we propose an algorithm to control the aggregate bandwidth of the incoming non-real-time TCP traffic at the RG so that QoS requirements of the real-time traffic can be guaranteed. The idea is to limit the maximum data rates of active TCP connections by dynamically manipulating their flow control window sizes based on the total available bandwidth for the non-real-time traffic. We show by simulation results that our algorithm limits the aggregate bandwidth of the non-real-time TCP traffic thus granting the real-time traffic the required bandwidth.