The task is to create a ws connection to litestar and when the user types in an input field the name of the room then he connects to that room (channel) and if that room did not exist it is created. Everyone should be able to recieve messages from everyone in the room. The room/channel must somehow implement a limit eg. 10 people. The somehow somehow should filter when to broadcast to other people in the room.
#Chatrooms are they possible?
1 messages · Page 1 of 1 (latest)
Notes for Chatrooms are they possible?
At your assistance
@sage ibex
No Response?
If no response in a reasonable time, ping @Member.
Closing
To close, type !solve or byte solve.
MCVE
Please include an MCVE so that we can reproduce your issue locally.
Here's some relevant documentation
https://docs.litestar.dev/latest/usage/channels.html
I have read that but I feel I need example code.. is it possible that when a user enters a new chatroom and new route is created and other can connects directly to it?
not a direct reply but here is something you can draw inspiration from https://blog.litestar.dev/creating-a-websockets-chat-in-just-30-lines-with-litestar-2ca0f3767a47 , the blog is from one of the maintainers. It uses what @pearl arch showed
Yes I have read this.. the thing is he manually joins the "chat" channel, whereas I "as a user of the website" want to select which channel I join
You could have your pre-defined channel names in a drop down select form or similar, and pass that to the back end via path/query params
This is not what I need..I need user defined channels
you maybe can start showing what code you have and where you are blocked, that would be a good start, it's rather difficultotherwise