Also available in: Polski
The "IPC Publish-Subscribe" project allows logged-in users of the system to communicate with each other by transmitting their broadcast messages based on types to which they previously subscribed. A server is responsible for proper operation of the system and all activities pass through it.
- Login to the system
- Display the menu
- Display available messages types to subscribe
- Register to the broadcast system
- Register a message type
- Broadcast new message
- Receive a message synchronously
- Receive a message asynchronously
- Block a user
- Logout from the system
Additionally created server lists all the infomation about the actions it takes and their effects, which was helpful and convenient while writing and testing the program. A time limitation of its operation has been also implemented, which means that the server will operate for a maximum number of seconds (after the last client logs out of the system) as the value of SERVER_STANDBY_TIME, which can be freely configured and is set to 10 seconds by default.
Unix:
gcc -Wall server.c -o server
gcc -Wall client.c -o client
To run the whole program, we should start with the server:
./server
Then, in each new console window, we have the option to run the client program:
./client