Revert "no tasks for OnOpen, OnClose, and on MessageReceived"

This reverts commit f66324c11b67ec43d1d6cb64833fe5d3f7d8b332.