Cloud Development Kit

How to reuse websocket connection to access myscript api


We would like to know how to call myscript web api with only one websocket per a webpage ( where mutiple textboxes's input will be fed by hand written text),

instead of opening a new websocket per every input feild of the form in a webpage. As websocket is a costly ( sometimes it takes 5-10 seconds to open a ws connection ) , we are planning to reuse same connection through out the form.

Please guide us.


1 Comment

Dear Rajendra,

We provide an example with MyScriptJS showing a custom integration with two websockets connections to manage multiple inputs. 

The reason we use two and not only one is to always have an available editor to manage the input. 

You can find the example online on github here Multiple inputs and the source code here : HTML and Javascript.

Best regards,

Romain - Web developer @MyScript

Login or Signup to post a comment