In your screenshot, I see 

$('<div>') simpledialog2(

But W3Schools says:
https://www.w3schools.com/Jquery/jquery_syntax.asp

Basic syntax is: $(selector).action()
  • A $ sign to define/access jQuery
  • A (selector) to "query (or find)" HTML elements
  • A jQuery action() to be performed on the element(s)

I didn't write JavaScript for decades, and I'm not an expert.
BUT: I fail to detect the point after the closing bracket
It was just my Studio that marked it as an error.

created with NPI

you could try to set your terminator to null String "". 
it is optional accordig to docs
https://docs.intersystems.com/iris20251/csp/docbook/DocBook.UI.Page.cls?KEY=GIOD_tcp#GIOD_tcp_open

  • terminators

Optional — A list of up to eight user terminator characters that will terminate reads on the TCP binding device. If you specify both T mode and terminators at the same time, T mode is ignored.

I wonder how you expect to know that your input is complete without any terminator.
And according to your example, you also don't have a fixed length:
Withoit an clear signal timeout seems to be the only way to know you are complete.

You may read input character by character without guarantee  
how do decide for 1 or 10 or 100 or 1000  ?
Some ending character (eg. not numeric) or a fixed length is required

Open Exchange applications:
Certifications & Credly badges:
Robert has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following: