I recently switched to gamma, love the new “everything”, (especially the zoming function while patching) but get more and more frustrated because:
I can’t find out how to get the (string) data received by IO.TCP’s TCPServer.
In beta, received strings are available through TCP (Network Server String)/Output.
In gamma, I tried TCP [IO.TCP] (available after Manage Nugets/Commandline - nuget install vl.io.tcp -pre), but I can’t find out where the received strings are available. (With network tool “wireshark” I see the packets with the strings are received by the server.)
While the TCPClient has the SendString companion for sending strings, the TCPServer doesn’t seem to have a buddy like this.
hey oliver, good point. a simple way to receive strings is indeed missing. so far you’d have to know a bit more about how to tokenize the received bytes and convert them to string…
i’ll see what i can do about this and let you know when the pack is updated…
Besides of doing something for living, I played with that new node ReadStringUntil and I’m not where I was with beta yet.
After data passes ReadStringUntil and S+H into IOBox, I only see the last line of the received multiline string.
A hint how to keep the whole string (with many “\n\r”) would be highly appreciated. (Can ReadStringUntil read until EOF/EOT?)
ReadStringsUntil on the other hand gives an Observable <Spread>. How do I convert this into a single string.
yes, that is exactly what it does. it is a convenience node for cases where you’re receiving data continuously and where it is OK to only always get the last string.
it reads until whatever character (or combination of characters) you specify in the “Terminator” input. and then obviously you also need to add that character at the end of your xml string. so add an EOT at the end of the string you send and specify it in the Terminator input and you should be good.
to specify non-printable terminators, use the FromBytes node:
Phantasic!
Works wonderfully. The until-condition (“end of submitted string”) is now “</PassengerDoorCountDelivery>” and when I concat the resulting string with “</PassengerDoorCountDelivery>” again then I got the original string that was sent.
The string is an ITxPT message in xml.
Thank you, joreg, for your support. That helps me making vvvv/VL my personal multipurpose toolkit (want to use it for everything.)