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

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

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0 Beta3, 5.15
    • Fix Version/s: None
    • Component/s: WebSockets
    • Platform/s:
      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

            Assignee:
            cnn Qt Core & Network
            Reporter:
            taytoo atif Goheer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes