Automatically message background page functions on socket creation / destruction if exists.