ayanda83
12th May 2013, 14:20
I'm coding this client/server application for chatting. My client is able to send messages to the server, so is the server to the client but, messages from server to client can only be sent in this form
socket->write("Hello Client! Meassage from Server!"); but when i do this
QByteArray clientMsg;
clientMsg.append(("Hello Client! Meassage from Server!") the client displays some ascii gabbage. what is coursing this? am i doing something wrong? The reason for me wanting to use the second method is that I want to take a message from one client application and relay it to another client via the server. But the way I am using the
readAll() function to read data from the socket on the client side. Any help will be appreciated.
socket->write("Hello Client! Meassage from Server!"); but when i do this
QByteArray clientMsg;
clientMsg.append(("Hello Client! Meassage from Server!") the client displays some ascii gabbage. what is coursing this? am i doing something wrong? The reason for me wanting to use the second method is that I want to take a message from one client application and relay it to another client via the server. But the way I am using the
readAll() function to read data from the socket on the client side. Any help will be appreciated.