Socket Project (getting one of multiple clients IP)

This is a discussion on Socket Project (getting one of multiple clients IP) within the C Programming forums, part of the General Programming Boards category; I am making a project for my computer science class. I need to create a multiuser chat program where a ...

  1. #1
    Cl0wn
    Guest

    Socket Project (getting one of multiple clients IP)

    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: chillin
    Rav8Warriors5enS: bout to do some weightliftin and then study
    wake nate05: cool"

    Any help is appreciated.

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    99
    Well I don't know how to do threads, secondly can you not get the IP where activity is taking place?

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    99
    Ahh that works nicely and thanks for that example on threads. Now I just have to get it to work on good ol Windows .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting Ip from socket.
    By b00l34n in forum Networking/Device Communication
    Replies: 32
    Last Post: 10-19-2004, 03:31 AM
  2. Including multiple .cpp file in project
    By bonkey in forum C++ Programming
    Replies: 2
    Last Post: 11-04-2002, 08:41 AM
  3. Multiple Clients Winsock
    By PrivatePanic in forum Windows Programming
    Replies: 6
    Last Post: 07-26-2002, 07:38 AM
  4. Replies: 2
    Last Post: 03-05-2002, 05:52 AM
  5. server with multiple clients
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 02-23-2002, 09:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21