[Interest] QTcpSocket bind method failed when proxy server is configured in windows OS

neel patel neel5481 at gmail.com
Mon Jul 3 12:14:32 CEST 2017


Hi,

I am just finding the free available random port using below code in
windows OS. ( Using Qt 5.9.1 ).


*quint16 port = 0L;*
*QTcpSocket socket;        *
*socket.bind(0, QTcpSocket::ShareAddress);*
*port = socket.localPort();*

Windows OS - When the proxy server is not configured then above code works
fine but when user configure the proxy server in windows then "bind" method
fails and gives "Operation not permitted" error.

Can anyone suggest how to solve this issue when proxy server is configured ?

Thanks in Advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170703/f2b0dbf9/attachment.html>


More information about the Interest mailing list