Hi there.
I have created a QTcpSocket and called connectToHost on a given address and port. Later I respond to the stateChanged signal before it's in the ConnectedState state and need to know the address and port the socket is trying to connect to. Unfortunately while peerName remembers who connectToHost was referring to, peerPort returns zero until after the connection has been made.
Apart from being irritatingly inconsistent, is there another way to fetch the port as passed to connectToHost? Storing a copy elsewhere breaks my encapsulation![]()
Bookmarks