Greetings to all,
I am using a thread to read messages over a socket which allows a person to type while the thread reads the messages from the other client. the problem is that the thread misses out on every next message, for example if I typed “Hello” the first time and then type “how are you” ? then afterward typed “where are you?”. The Only ones that appears on the other computer are “Hello” and “Where are you?”.
I no idea why it is doing this, do I need to create like a protocol to specify heads and ends of messages for this?
I am using Object[Input/Output]Stream to read and write .
However, I also got to read about java.nio, and think it could be my solution though I need some feedback… because I really want to save sometime
Thanks