StreamingSocket::portNumber confusion

Is there a way of getting the remote port number of any new connections accepted via StreamingSocket::waitForNextConnection() ?

The portNumber member seems to get set to the remote port number only when calling connect() but everywhere else it’s set to the local port number.


AFAIK the outbound port numbers are dynamically assigned, and bound after that moment of connect anyway (i.e. unusable for anybody else). What do you need it for?