<div dir="ltr">Hi Tom, <div><br></div><div>The array list should only contain the names that belong to that directory:</div><div><a href="https://github.com/Kitware/paraviewweb/tree/master/src/IO/WebSocket/ParaViewWebClient">https://github.com/Kitware/paraviewweb/tree/master/src/IO/WebSocket/ParaViewWebClient</a><br></div><div><br></div><div>Then your custom protocol should looks like:</div><div><a href="https://github.com/Kitware/paraviewweb/blob/master/src/IO/WebSocket/ParaViewWebClient/ProxyManager.js">https://github.com/Kitware/paraviewweb/blob/master/src/IO/WebSocket/ParaViewWebClient/ProxyManager.js</a><br></div><div><br></div><div>Except that you will need to nest it inside an object like:</div><div><br></div><div>{ </div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">  CustomProtocol1: [...content of the previous example...],<br class="gmail-Apple-interchange-newline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">  CustomProtocol2: [...content of the previous example...],</span></span><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">}</span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Then to use it you will do:</span></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div><span style="text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="text-align:start;text-indent:0px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="background-color:rgb(255,255,255)">client.CustomProtocol</span>1.availableSources().then(...<br><br>You can find a live example of its usage here:<br><a href="https://github.com/Kitware/divvy/blob/master/Sources/client.js#L27-L65">https://github.com/Kitware/divvy/blob/master/Sources/client.js#L27-L65</a><br><br>HTH,<br><br>Seb<br></span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 2, 2018 at 5:02 PM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">How do I learn what to do on the client side? I see the ParaViewWebClient.<wbr>createClient() function, and I see that I can add a hash of custom protocols to it, but when I try, the client complains.<div><br></div><div>I tried this:</div><div><br></div><div><div>const config = { sessionURL: 'ws://localhost:1234/ws' };</div><div>const smartConnect = SmartConnect.newInstance({ config });</div><div><br></div><div>const amsProtocols = {</div><div>  testbuttonService: function createMethods(session) {</div><div>    return {</div><div>      testbutton: () => {</div><div>        console.log("hi there ******************");</div><div>        return session.call('amsprotocol.<wbr>testbutton',[])</div><div>          .then((result) => log('result' + result));</div><div>      },</div><div>    };</div><div>  },</div><div>};</div><div><br></div><div>smartConnect.<wbr>onConnectionReady((connection) => {</div><div>  const pvwClient =</div><div>        ParaViewWebClient.<wbr>createClient(connection,</div><div>                                       [</div><div>                                         'MouseHandler',</div><div>                                         'ViewPort',</div><div>                                         'ViewPortImageDelivery',</div><div>                                         'testbuttonService'       // <--- I thought this...</div><div>                                       ],</div><div>                                       amsProtocols);              // <--- ...was a key into this hash. No?</div><div> </div></div><div>Obviously I'm misunderstanding something here, but can someone explain what I'm missing? Where is the structure of a client described?</div><div><br></div><div>Do I need to do any of this if all I'm trying to do is to get button presses and selection widgets to communicate with the pvpython server?</div><div><br></div><div>Thank you,</div><div><br></div><div> -Tom</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 11:49 AM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you, I will look at it. <div><br></div><div> -Tom</div></div><div class="m_7072406162508462563HOEnZb"><div class="m_7072406162508462563h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 22, 2018 at 11:24 AM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">LightViz will be a good example as it defines a custom set of protocols instead of using only the default ones like in Visualizer.<div><br></div><div><a href="https://github.com/Kitware/light-viz/tree/master/server" target="_blank">https://github.com/Kitware/lig<wbr>ht-viz/tree/master/server</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_7072406162508462563m_3184310194794949366h5">On Thu, Feb 22, 2018 at 6:59 AM, Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_7072406162508462563m_3184310194794949366h5"><div dir="ltr">Hello all:<div><br></div><div>Can someone describe the steps necessary to create and use a web socket connection between a Paraviewweb client and a pvpython server? I am not having much luck finding the documentation for registerVtkWebProtocol() which appears to be an important part of the process. Google only helps me find pvw-visualizer.py, which I'm sure is useful code, but I'm having a hard time making much sense of it as an example.</div><div><br></div><div>I would appreciate even just being pointed to the vtk python code, but I'll take any pointers you can offer.</div><div><br></div><div>Thank you,</div><div><br></div><div> -Tom</div></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>