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

Add support for binding the QWebSocket connection to a specific address

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • WebSockets
    • None
    • All

    Description

      Having multiple network interfaces it's not possible to decide which one is to use for outgoing QWebSocket connections.

      For QTcpSocket there is support for binding sockets, which allows to used to specify which interface to use for an outgoing connection, which is useful in case of multiple network interfaces.

      As QWebSocket uses a QTcpSocket internally to make the connection, perhaps adding a

      setBindAddress with the same signature as QAbstractSocket::bind() would allow for the use case.

      I'm also happy to provide an implementation for that.

      There is also an ongoing unresolved topic in the forums for this missing feature: https://forum.qt.io/topic/106328/bind-qwebsocket-qnetworkaccessmanager-to-specific-local-interface-ip

       

      Attachments

        For Gerrit Dashboard: QTBUG-134732
        # Subject Branch Project Status CR V

        Activity

          People

            tpochep Timur Pocheptsov
            valentin-batz-riedel Valentin Batz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change