I'm writing a client and I want to know which write should I use.
the Client can send multiples messages in a short time, and I want to be
sure that the server receive the message correctly.
what I mean is that the order is not important.. but I don't want to receive
2 messages from the clients merged together.
ex :
client send 2 messages :
#1 - HELLO
#2 - WORLD
the server could receive
WORLD
HELLO
that's fine with me
or
HELLOWORLD that's fine too
HELLWORLDO (merged).. BAD
I don't want a blocking client on write operations so I have the choice
between this ?
connector_handler.writeToAsyncQueue(buf);
connector_handler.write(buf, false);
right ?
which one should I use from my example ?