Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add higher level server examples #269

Merged
merged 8 commits into from
Jun 23, 2023

Conversation

jordanhalase
Copy link
Contributor

@jordanhalase jordanhalase commented Jun 22, 2023

This shows example usage of a few concepts:

  • Querying payload size in a POST handler before receiving data
  • Parsing JSON in a POST handler
  • Querying frame size in a WebSocket handler before receiving data (using @ivmarkov's fix)
  • WebSocket sessions

Closes #266

Copy link
Collaborator

@Vollbrecht Vollbrecht left a comment

Choose a reason for hiding this comment

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

Thank you for tainting the repository with JS 😂

Jokes aside in a first fast glance it looks good to me.

examples/ws_guessing_game.rs Show resolved Hide resolved
examples/ws_guessing_game.rs Show resolved Hide resolved
@jordanhalase
Copy link
Contributor Author

I just made some small improvements and explained the usage of core::mem::forget(). :)

@ivmarkov ivmarkov merged commit 4e61575 into esp-rs:master Jun 23, 2023
@Vollbrecht
Copy link
Collaborator

Thanks for the PR ❤️

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.

Session context for websockets
3 participants