Hello,
I’m trying to make a client in Juce to connect to my basic Java server.  I’m having trouble with the read and the write commands of serversocket.
s = new StreamingSocket();
s->connect(String(“localhost”), 8000));
char buf[6];
sprintf(buf, “%d\n”, 1);
if (s->waitUntilReady(false, 5000) == 1) {
numOfBytesWrite = s->write(buf, 6);
numOfBytesWrite = s->write(buf, 6);
}
The first write command writes “1” to the server, as expected.
The second write, writes “\ˇ\ø” without the two .
Is this some kind of terminator character?
What is the correct way to write strings to the socket?
Thanx
Gilles
