A method and an apparatus are provided for improving or optimizing the
frequency at which the keep-alive messages are sent to a network device
(e.g., an Internet service platform) from a set top box (STB) connected
to a router or gateway. By improving or optimizing the frequency at which
these messages are sent by the STB to the network device, the amount of
network bandwidth that is consumed as a result of sending keep-alive
messages can be reduced. This allows a network device to remotely and
asynchronously access a STB in a very efficient manner in terms of
bandwidth consumption.