View Full Version : QtcpSocket and ports being used
youngw
30th October 2010, 09:07
Is there a way on Qt to look at the host and see which ports are being used and by whom?
Would tcpSocket->listen() or udpSocket->bind() give me the information.
squidge
30th October 2010, 12:05
You could parse the output of Netstat by using QProcess ?
Robbie
30th October 2010, 16:11
listen() and bind() are members of the relevant xServer classes and not the xSocket classes.
You can find out the local and foreign addresses and ports from QAbstractSocket::localHost(), QAbstractSocket::localPort(), QAbstractSocket::peerAddress() and QAbstractSocket::peerPort()
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.