Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16155

QTcpSocket TCP connection to localhost uses internet access point

XMLWordPrintable

      The use case is to connect with a Qt Application to a local TCP server (written in Symbian C++).

      For this open a TCP/IP connection to the LocalHost with QTcpSocket:

      iTcpSocket = new QTcpSocket(this); 
      iIpAddress = QHostAddress(QHostAddress::LocalHost).toString(); 
      iPort = 9393; 
      iTcpSocket->connectToHost(iIpAddress, iPort); 
      

      This works fine as long as the default connection is a valid connection. We can use a valid internet accesspoint or a WLAN ad-hoc accesspoint. And in this way the connection to the local server is successful open the communication to the TCP-Server works.

      But if we need just a local connection and do not want to open a connection with a access point i.e without using the connection management (access point, bearer), is not working with this way.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shkearns Shane Kearns
            ashish.wip Ashish Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes