Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0 Beta3, 5.15
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.