i’m trying to setup a StreamingSocket. Right now, it only works on windows (i created another topic for the OSX not working part).
I can create the StreamingSocket and connect to a remote server.
Then when i use the write function, nothing happens server side, but when i close my app, everything i tried to send is sent at once.
Right now my code is opening and closing the socket each time i want to send a message, which is really not a good practice, but the only examples i found using StreamingSocket to send data are one-shot demo of opening-writing-closing the socket right away.
I notice that most of the socket libraries have a “flush” function to force the pipe to send the data in the buffer, but there is nothing like that in Juce.
Is there something i’m missing ?
Here’s my code :
if (!sender.isConnected()) setupSender();
DBG(“Send TCP String :” << s << " > " << s.length());