code: function sendClientConsoleMessage(ws, message) {
    var msg = JSON.stringify({
      custom: {
        console: message
      }
    });
    ws.write(msg);
  }
docs: Sends the given string to the client, where it will be printed to the
  JavaScript error console (if available).