I am making a project for my computer science class. I need to create a multiuser chat program where a user on logon will recieve a request form the server asking for a user name. The server will get the clients username and its IP address. I am stuck on how to get that person's IP address when he begins to enter his message. I know of the inet_ntoa() function but I am not sure how to specify the correct user. The end result upon all the clients screens will be something of the sort:
"wake nate05: what about you?
Rav8Warriors5enS: bout to do some weightliftin and then study
wake nate05: cool"
Any help is appreciated.