diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-09-25 23:06:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 23:06:18 -0400 |
commit | 188a810cf2a4aef190d40ab166332b13ef3a165e (patch) | |
tree | 47d9d9685d4a91ee3614c93e3d36bc3cf7ac474d | |
parent | 28679eed6e7f8f2e410b7a04ad1f02c4b516a756 (diff) |
Update README.md
-rw-r--r-- | README.md | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,4 @@ -# Project Title -Snowcast +# Snowcast ## Description @@ -9,20 +8,25 @@ A music streaming server consisting of three programs: the server, the client co ### Making the executables -* Ensure you have gcc installed, as that is what the make file uses. +* Ensure you have gcc installed, as that is what the Makefile uses. * Run `make` in your terminal to make the 3 executables `./snowcast_server`, `./snowcast_control`, & `./snowcast_listener`! ### Executing program -* To run the server, type in `./snowcast_server` into your terminal. It wil tell you the necessary arguments. +Running the 3 executables without arguments will tell you the necessary arguments to get going. + +* To run the server, type in `./snowcast_server` into your terminal. * To run the controller, type `./snowcast_control` into your terminal. * To run the listener, type `./snowcast_listener` into your terminal. ### Program Design +I did not implement origonal design doc, due to random malloc errors with the autograder. I rewrote the server, with the the design... + * A "select_thread" controls accepting new clients and responding to commands from clients. It redirects the logic to separate helper functions to send replies. * The station information is held by an array. Each station has a thread that broadcasts to the listeners every half-second (at half the rate per second). During the downtime of this half-second, the station file is read into a buffer and threads are created off of this buffer, waiting to be released. At the top of the second, the station thread then bradcasts a `cond` variable to start all threads that send the station. * The `users` pointer containing the user data (along with the separate stations pointer) has a mutex `users_mutex` that allows safe-thread write and deletion. This pointer is also dynamic, using realloc when more memory is needed. There are a few memory optimizations implemented (see `init_user(...)`). +* The code is well documented, so many smaller design choices can be read there :) ## Acknowledgments |