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

Ed websocket lobby redirect #234

Merged
merged 5 commits into from
May 25, 2024
Merged

Conversation

MEnesDeniz
Copy link
Collaborator

@MEnesDeniz MEnesDeniz commented May 13, 2024

Overview

TODO: What does this PR contain? Why was the change necessary?

Issue Linked: #134

Changes

  • Implemented a WebSocket server that broadcasts a message to all connected clients when an experimenter joins the lobby.
  • Updated the client-side JavaScript to handle WebSocket messages and trigger a browser refresh upon receiving a specific message indicating a new experimenter's arrival.
  • Refactored lobby management code to integrate WebSocket connection setup and message handling efficiently.

How to test?

  1. Start the server and navigate to the experimenter's lobby.
  2. Open multiple browser windows as different participants and connect them to the lobby.
  3. Join the lobby as an experimenter from another browser window.
  4. Observe that all participant browsers automatically refresh upon the experimenter's entry.
  5. Check the server logs to ensure that the WebSocket message is broadcasted correctly when the experimenter joins.

Checklist

  • [ X ] Correct base branch was selected (usually development)
  • [ X ] development was merged into this branch and potential conflicts resolved
  • [ X ] Issues which were solved are linked. Be sure to make that manually because Closes/Fixes keywords only work when base branch is main.
  • [ X ] Terminology is consistent with the rest of the codebase
  • [ X ] Reviewers are assigned
  • [ X ] Optional: Wiki pages were updated to reflect the changes (list changed pages above)

@MEnesDeniz MEnesDeniz requested a review from NCEghtebas May 13, 2024 15:50
@MEnesDeniz MEnesDeniz self-assigned this May 13, 2024
@NCEghtebas NCEghtebas linked an issue May 13, 2024 that may be closed by this pull request
2 tasks
@NCEghtebas
Copy link
Member

I believe something is happening to the connection state such that the connection to the backend is not able to create a new session.

@MEnesDeniz
Copy link
Collaborator Author

I believe something is happening to the connection state such that the connection to the backend is not able to create a new session.

Could you please elobarete it more? Thus I could further fix it.

@MEnesDeniz MEnesDeniz requested a review from gulbikeimge May 24, 2024 12:22
@NCEghtebas NCEghtebas merged commit c27952d into development May 25, 2024
4 checks passed
@NCEghtebas NCEghtebas deleted the ed-websocket-lobby-redirect branch July 2, 2024 14:18
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.

Cannot Access Session data before session is started
3 participants