StreamingSocket::portNumber confusion


#1

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.

Thanks,
Mike.


#2

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?