What error? Do you mean your debug message?
Yes.
Have you checked out Qt's networking examples?
A lot of them, and they dont work for me.
After my app starts i press "connect" button and server recognize my client perfectly. Next, I'm pressing another button and I'm calling this function:
void SimpleChatClient::func()
{
socket->write("something");
buffer.clear();
socket->waitForReadyRead(5000);
buffer = socket->readAll();
if(buffer.size() == 0)
{
qDebug("Error: Empty buffer.");
}
p1l->setText(buffer);
}
void SimpleChatClient::func()
{
socket->write("something");
QByteArray buffer;
buffer.clear();
socket->waitForReadyRead(5000);
buffer = socket->readAll();
if(buffer.size() == 0)
{
qDebug("Error: Empty buffer.");
}
p1l->setText(buffer);
}
To copy to clipboard, switch view to plain text mode
which is sending message to server. Server receive this msg and is sending msg to client, and now problem starts - I cant receive this msg from server (I think server is ok, becouse client made in python works good).
Bookmarks