Whenever any socket function is called, make a call to debounced heartbeat to prevent unnecessary lambda calls while active. Decorators might be useful?