I have successfully write a socket code where data can be sent to/from a client/server host using c++. However, I would like to add a function where the server can print out to the user the ip number of the client which has successfully connected to the server. For example, the client uses 192.168.1.5 and when the client is connected to the server, the server will display to the monitor "192.168.1.5 is already connected to the server". The network environment can be in LAN as well as WAN. How can i do this? thanks.