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!");
socket->write("Hello Client! Meassage from Server!");
To copy to clipboard, switch view to plain text mode
but when i do this
clientMsg.append(("Hello Client! Meassage from Server!")
QByteArray clientMsg;
clientMsg.append(("Hello Client! Meassage from Server!")
To copy to clipboard, switch view to plain text mode
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()
readAll()
To copy to clipboard, switch view to plain text mode
function to read data from the socket on the client side. Any help will be appreciated.
Bookmarks