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

Calling QTcpSocket::bind() before connectToHost() does not bind the address of the outgoing connection actually.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.0.1
    • Network
    • None
    • Linux (Gentoo x64)

    Description

      Qt 5 and QTBUG-121 introduced a new API to bind the local address for QTcpSocket. However, it does not work actually, the socket always use default local address to connect.
      The cause is QAbstractSocketPrivate::_q_connectToNextAddress() calls initSocketLayer(), which close the bound socket, replace it with a newly created socket, and leave the new socket unbound.

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            jackieku Kai-Chieh Ku
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes