How to use the paraview-lite/src/io/Client function in paraview-lite

To help you get started, we’ve selected a few paraview-lite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / light-viz / src / stores / network.js View on Github external
NETWORK_CONNECT({ commit, dispatch, state }) {
      const { config, client } = state;
      if (client && client.isConnected()) {
        client.disconnect();
      }
      const clientToConnect = client || new Client();
      clientToConnect
        .connect(config)
        .then((validClient) => {
          commit(Mutations.NETWORK_CLIENT_SET, validClient);
          dispatch(Actions.TIME_FETCH_ACTIVE_INDEX);
          dispatch(Actions.PROXY_PIPELINE_FETCH);
          dispatch(Actions.APP_ROUTE_RUN);
          dispatch(Actions.COLOR_FETCH_PRESET_NAMES, 500);
        })
        .catch((error) => {
          console.error(error);
        });

      clientToConnect.setBusyCallback((count) => {
        commit(Mutations.BUSY_COUNT_SET, count);
      });
github Kitware / paraview-lite / src / stores / network.js View on Github external
PVL_NETWORK_CONNECT({ commit, dispatch, state }) {
      const { config, client } = state;
      if (client && client.isConnected()) {
        client.disconnect();
      }
      const clientToConnect = client || new Client();

      clientToConnect.setBusyCallback((count) => {
        commit('PVL_BUSY_COUNT_SET', count);
      });

      clientToConnect.updateBusy(+1);

      clientToConnect.setConnectionErrorCallback((type, httpReq) => {
        const message =
          (httpReq && httpReq.response && httpReq.response.error) ||
          `Connection ${type}`;
        console.error(message);
        console.log(httpReq);
      });

      clientToConnect