Wrote _wsOnMessage function
Wrote _wsOnMessage function