def publish_to_socket(params)
      message = params.is_a?(String) ? params : params.to_json
      data = "~m~#{message.length}~m~#{message}"
      @socket.send(data)
    end
def publish_to_socket(params)
      message = params.is_a?(String) ? params : params.to_json
      data = "~m~#{message.length}~m~#{message}"
      @socket.send(data)
    end
Publishes the given params to the web socket