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

Add method in QWebSocket to Bind it to a specific IP/Port

    XMLWordPrintable

Details

    • All

    Description

      Some applications need to offer the ability to select which network interface/address an application should use to communicate. QTcpSocket and QUdpSocket both have the option to bind to specific IP/port combination, however, the bind method is lacking in QWebSocket.

      Proposed methods: 
      1. bool QWebSocket::bind(const QHostAddress &address, quint16 port = 0, QAbstractSocket::BindMode mode = DefaultForPlatform)

      2. bool QWebSocket::bind(quint16 port = 0, QAbstractSocket::BindMode mode = DefaultForPlatform)

      QAbstractSocket already has these two bind methods with identical parameters. Since QWebSocket internally uses a QTcpSocket, the change is very straightforward in that the proposed methods in QWebSocket simply need to call the respective method in QTcpSocket and return value.

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            taytoo Mike Flanigan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes