in reply to Client/server issues - Server is not receiving information until client closes the connection

What are the "issues"? You've posted code and said there may be a problem with it, but you haven't said what you want it to do or what it actually does. How does its behavior deviate from the desired behavior? Perhaps have a look at How do I post a question effectively?

Update after the OP's update: My guess is you're suffering from buffering.

Replies are listed 'Best First'.
Re^2: Client/server issues
by sergey (Novice) on Apr 21, 2008 at 18:48 UTC
    Thank you so much. That fixed it ^_^
Re^2: Client/server issues
by sergey (Novice) on Apr 21, 2008 at 18:24 UTC
    I'm sorry about that, I'll change it.