How to determine ip address of remote host?
Hi Folks,
is there a way to determine the ip address of a remote host by the socket descriptor passed to QTcpServer::incomingConnection()?
I would like to accept only connections from trusted ip addresses.
Please let me know if you have any ideas how this can be done.
Thanks in advance,
nop nop nop....
Re: How to determine ip address of remote host?
If you have QTcpSocket you can use the peerAddress() method. With a descriptor you might try POSIX getpeername() function.