How obtain IP address of other Pc in C++ and ubuntu 14.04 ???

Hello I am beginner programmer and i make my final thesis of Magister in electronic art.
My project its a multi-player on line video game . For thats i Need know by software the IP adress of logged computer to server .
I haven't a server today but I have two Pc in my house and I like make a prototype code for intra-net.
Actually I have two C++ code Hi interchange data in UDP protocol. For that I put by hand the Ip adress but I need make that by software.

Any person have a simple code for that ????


Thank full

( if you can write in spanish better ).
accept() returns the address of the client for TCP and recvfrom() for UDP.
Topic archived. No new replies allowed.