Let's assume we have rooms that have multiple users; when there are no users in that room, the creator may formally remove it to save memory space and prevent any users from accessing the websocket endpoint/namespace.
What is the feature you are proposing to solve the problem?
As per the title, a function/method that can create and remove websocket endpoint at runtime.
My suggestion would be:
Declaration
const app = new Elysia();
app.ws("/room-1", {
...
});
Remove websocket namespace feature
...
app.remove("/room-1");
...
Add websocket namespace feature
...
app.ws("/room-1", { }); // Doesn't work during runtime
...
P.S: This feature may be also used for removing REST API endpoints.
What is the problem this feature would solve?
Let's assume we have rooms that have multiple users; when there are no users in that room, the creator may formally remove it to save memory space and prevent any users from accessing the websocket endpoint/namespace.
What is the feature you are proposing to solve the problem?
As per the title, a function/method that can create and remove websocket endpoint at runtime.
My suggestion would be:
Declaration
Remove websocket namespace feature
Add websocket namespace feature
P.S: This feature may be also used for removing REST API endpoints.
What alternatives have you considered?
No response