Reference no: EM132193784
Write a C/C++ Program. Client/Server Directory
The application you will write for this implements a directory server.
you should write a client/server application that does the following:
- The concurrent server program runs waiting for a connection from a client.
-The clients and the server should (in general) run on different machines.
- Each client can send three different messages -- JOIN, LEAVE and LIST. The first two are for joining and leaving the list of players who are online and are willing to play.
The last is to retrieve the list of online players. The server responds to these messages with the appropriate actions. Note that the server needs to be concurrent because multiple clients should be able to talk to it simultaneously.
-This is meant to be a skeletal program, and you probably will need to impose some limitations; that is fine, just state them clearly.
-Sockets close when the program quits.
- Use socket 22317
here are very short barebones java code for a seqential server and client. Some host names in one of the undergrad labs (LAS 1004) are ptl10,....,ptl23.
for C
Compile the programs with gcc instead of cc.
For the server program, you need the -lsocket flag
For the client program, you need the flags -lsocket -lnsl
Program can be written in either c/c++/java