A computer-implemented method for controlling a data stream from a server computer to a client computer, the client computer comprising a data stream client and the server computer comprising a data stream server, the method comprising: - establishing, by the data stream client, a session with the data stream server, wherein the data stream server specifies a timeout for the session by specifying a time in a timeout parameter; - while receiving, by the data stream client from the data stream server, the data stream: -- generating (S107,S609), by the client computer, a power management decrease event in response to inactivity of a user of the client computer; -- receiving, by the data stream client, the power management decrease event; and -- sending (S109,S611), from the data stream client to the data stream server, a first pause request to temporarily halt the data stream, wherein the first pause request is sent after the power management decrease event; - saving, by the data stream client, a pause point of the data stream; - transitioning, by the client computer, from a fully working power state to a decreased power consumption state in response to the power management decrease event; - determining an increase in power consumption of the client computer; - transitioning, by the client computer, from the decreased power consumption state to the fully working power state; - generating, by the client computer, a power management increase event after the transition from the decreased power consumption state to the fully working power state; - receiving, by the data stream client, the power management increase event; - sending a resume request to the data stream server; - when a time between the first pause request and the resume request exceeds the time specified in the timeout parameter, reestablishing, by the data stream client, the session with the data stream server by transmitting the pause point in a new request to start transmitting the data stream; and - receiving, at the data stream client and from the data stream server, the data stream. - establishing, by the data stream client, a session with the data stream server, wherein the data stream server specifies a timeout for the session by specifying a time in a timeout parameter; - while receiving, by the data stream client from the data stream server, the data stream: -- generating (S107,S609), by the client computer, a power management decrease event in response to inactivity of a user of the client computer; -- receiving, by the data stream client, the power management decrease event; and -- sending (S109,S611), from the data stream client to the data stream server, a first pause request to temporarily halt the data stream, wherein the first pause request is sent after the power management decrease event; -- generating (S107,S609), by the client computer, a power management decrease event in response to inactivity of a user of the client computer; -- receiving, by the data stream client, the power management decrease event; and -- sending (S109,S611), from the data stream client to the data stream server, a first pause request to temporarily halt the data stream, wherein the first pause request is sent after the power management decrease event; - saving, by the data stream client, a pause point of the data stream; - transitioning, by the client computer, from a fully working power state to a decreased power consumption state in response to the power management decrease event; - determining an increase in power consumption of the client computer; - transitioning, by the client computer, from the decreased power consumption state to the fully working power state; - generating, by the client computer, a power management increase event after the transition from the decreased power consumption state to the fully working power state; - receiving, by the data stream client, the power management increase event; - sending a resume request to the data stream server; - when a time between the first pause request and the resume request exceeds the time specified in the timeout parameter, reestablishing, by the data stream client, the session with the data stream server by transmitting the pause point in a new request to start transmitting the data stream; and - receiving, at the data stream client and from the data stream server, the data stream.