Hello, is there some way to obtain system's IP adresses to bind socket to every of them separately instead od INADDR_ANY?
OR
If there is some way to get server's IP to which client has connected, for example:
server_app - bind to listen on INADDR_ANY, gets connected client to 1.2.3.4, communication works fine, but when server_app wants to know to which IP is connected client on it, it will get 0.0.0.0 or 127.0.0.1 which is bad
I want to know this because when I bind to INADDR_ANY and get incoming connection, I can only get client's IP and port, but don't know how to obtain server's IP which is connected to client (i always get 0.0.0.0).
Thanks for ideas..
//edit: And I forgot to write: unix/linux platform, not winsock