QTcpServer Error Setting proxy
-
Hi all, Im trying to set proxy for a QTcpSopcket, but suddenly when I call connectToHost()
I face with this error :" QAbstractSocket::UnsupportedSocketOperationError , The requested socket operation is not supported by the local operating system (e.g., lack of IPv6 support). "where is the problem?
here the code :
@ m_tcpSocket = new QTcpSocket();
connect(m_tcpSocket,SIGNAL(connected()),this,SLOT(sltConnected())); connect(m_tcpSocket,SIGNAL(stateChanged(QAbstractSocket::SocketState)), this,SLOT(sltStateChanged(QAbstractSocket::SocketState))); connect(m_tcpSocket,SIGNAL(error(QAbstractSocket::SocketError)), this,SLOT(sltError(QAbstractSocket::SocketError))); p.setHostName("118.97.63.227"); p.setPort(8080); p.setType(QNetworkProxy::HttpProxy); m_tcpSocket->setProxy(p); m_tcpSocket->connectToHost("www.google.com",80);@