is the conversation between a client and server synchronized? by that i mean, when the client writes to its output stream, will the server wait until its wrote to, before extracting the data from the client's input stream?
if not, could I get some pseudo code illustrating how this happens?
i saw something about flush() for the streams... does this play a part?
I've always done things synchronously ... the client sends a message and closes the socket, the server reads to end of stream which ends because of the close. Then the server responds and closes its stream, and the client reads to end of stream.
I think there's nothing to prevent both ends from reading and writing at the same time. You could try making a server that echoes one byte a time back to the client. See if there's such a thing in the socket tutorial.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I have a new question, i have the client sending a message to the server, and the server gets it and prints to the screen, now, how do i send the same message back to the client that sent the message to the server?
I have the sending done, but it seems that my chatting has a delay for awhile but then it will start working just fine.
client1 will say "hey" , but client2 will not recieve it. then client2 will say "hey2", then client2 recieves client1's msg, and then client1 recieves client2's message just fine, then the conversation is carried out normally, ived tried to think of wat could cause that. but I'm stumped.