Quote Originally Posted by Stanfillirenfro View Post
Since I am new on this point, could you please give me a path how to fix the problem?
The path is to design a communication protocol first before you start network programming.

To my knowledge, the server should receive and send the "chat message" in the same way like a file, the only difference being th esize of each. PLease corect me if I am not correct.
How should I know? It's your server not mine. If you claim the receiving end should be the same then I'll say that the sending end should be the same as well. However I have no idea how you wish to display an image file as text in the chat window.