This is a command line interface based multiperson chat server built using sockets.
- showip.c - This function shows the IP address of a host given on the command line.
- gittingHostName.c - This function returns the name of the computer our program is running on.
- pollserver.c - The is the main program of our chat server.
The codes were complied via WSL using GNU's gcc compiler. If you are on Windows or Solaris/SunOS, please refer to the reference attached below.
Simply compile the file using gcc showip.c
.
Run using ./a.out www.example.net
Compile using gcc gettingHostName.c
.
Run using ./a.out
.
This will return the name of your system which you can use during telnet.
Run it on one window
gcc pollserver.c
./a.out
Then, telnet localhost 9034
from a number of other terminal windows.