Hi
,
I'm using QT4.2.2 and I can't use the QTcpSockets (QtNetwork)
.
What about you ?
Here is my code :
#include <QtGui>
#include <QObject>
#include <QTcpSocket>
#include <QtNetwork/QTcpSocket>
int main(int argc, char *argv[])
{
socket->connectToHost("imap.free.fr", 143);
if ( !(socket->waitForConnected(-1)) )
{
printf("Unable to connect To Imap Server!\n");
return 0;
}
else printf("Connection OK\n");
return app.exec();
}
#include <QtGui>
#include <QObject>
#include <QTcpSocket>
#include <QtNetwork/QTcpSocket>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTcpSocket socket = new QTcpSocket();
socket->connectToHost("imap.free.fr", 143);
if ( !(socket->waitForConnected(-1)) )
{
printf("Unable to connect To Imap Server!\n");
return 0;
}
else printf("Connection OK\n");
return app.exec();
}
To copy to clipboard, switch view to plain text mode
For me, this code produce the following error :
error: base operand of '->' has non-pointer type 'QTcpSocket'
error: base operand of '->' has non-pointer type 'QTcpSocket'
To copy to clipboard, switch view to plain text mode
However, I would like to write a small application that will check new mails from an Intranet IMAP server. I wanted to use the libvmime library, but it's difficult to use on Windows 2000... So I need to make my own class to check the mails on the server (no need to display content, no need to send mails, ...).
Do you know if I can produce a socket oriented solution ?
So you know if I can implement a securised connection, like the IMAPs is ? (IMAP on SSL)
Thanks
Bookmarks