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.
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 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.