Hi all!
I'm new to socket programming on windows.
I made a client application working on linux using qtcpsocket, and it workd perfectly.
I compiled it on windows, but it doesn't connect. Acutally, it might not try to connect.
So, nothing happen. What should I do? Where is the problem.
I found nothing relevant on the internet.
The connection:
void sudoku::on_connectButton_clicked()
{
if( connected == false )
{
tcpSocket->abort();
tcpSocket->connectToHost(host,port);
ui.sendButton->setEnabled(true);
ui.
connectButton->setText
(QString("Disconnect"));
connected = true;
}
else
{
tcpSocket->abort();
ui.sendButton->setEnabled(false);
ui.
connectButton->setText
(QString("Connect"));
connected = false;
}
}
void sudoku::on_connectButton_clicked()
{
if( connected == false )
{
tcpSocket->abort();
tcpSocket->connectToHost(host,port);
ui.sendButton->setEnabled(true);
ui.connectButton->setText(QString("Disconnect"));
connected = true;
}
else
{
tcpSocket->abort();
ui.sendButton->setEnabled(false);
ui.connectButton->setText(QString("Connect"));
connected = false;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks