Skip to content

Conversation

@github-classroom
Copy link
Contributor

@github-classroom github-classroom bot commented Apr 12, 2022

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to main since the assignment started. Your teacher can see this too.

Notes for teachers Use this PR to leave feedback. Here are some tips: - Click the **Files changed** tab to see all of the changes pushed to `main` since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue **+** (plus sign). To learn more about comments, read “[Commenting on a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request)”. - Click the **Commits** tab to see the commits pushed to `main`. Click a commit to see specific changes. - If you turned on autograding, then click the **Checks** tab to see the results. - This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below. For more information about this pull request, read “[Leaving assignment feedback in GitHub](https://docs.github.com/education/manage-coursework-with-github-classroom/leave-feedback-with-pull-requests)”.

Subscribed: @grzenow4

README.md Outdated
## Biblioteki
- Bevy
- może coś do serializacji danych? (czy mógłby Pan coś polecić?)
Projekt aplikacji chatu napisanej w języku Rust,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Przydałoby się coś więcej powiedzieć...

grzenow4 and others added 16 commits June 2, 2022 12:44
- added framerate limiter to address issue of excessive CPU usage
- Message "packet" length is no longer fixed to 512 bytes
- Message "packet" length is now dynamic (must not be longer than 65535 bytes)

More details:

Message is no longer sent as fixed-size 512 byte stream consisting of  JSON padded with trailing zeros. Instead primitive Header-Body approach is used, server sends Header, then Body.

Header is u16 integer representing Body size in bytes (hence 2^16-1 size limit)

Body is JSON containing message sender, text, timestamp etc.
New client prototype
Project merged into one cargo workspace (updated `.gitignore` accordingly)

Divided source files into multiple ones (Both `client` and `server`)

Now both `server` and `client` are using more json and less raw data in communication (last raw data are used in Client->Server communication)

Removed unnecessary dependencies

Completely new client approach, much less resource-intensive than previous version, more terminal-friendly

Message size limit raised to 256 characters (still can be raised up by increasing `MESSAGE_MAX_LENGTH` const in client `main.rs` file)

Known issue - New client introduced some unwanted behavior when resizing console (specifically decreasing width)
Code tidy-up
Added server-side connections logging
fixed dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants