socket-controllers
socket-controllers copied to clipboard
Use class-based controllers to handle websocket events.
### Description When i use useSocketServer(io) without controllers array in options i have error "Cannot read property 'filter' of undefined" **Minimal code-snippet showcasing the problem** ```ts useSocketServer(io); ``` In src/index.js:36...
can we use socket broadcast to room without OnMessage i need to broadcast a emit on post save use like notification
Would like to develop something like this.. ```ts @SocketController() export default class ChatSocketController { @UseBefore(AuthenticationMiddleware) @OnMessage('sendMessage') async sendMessage( @SocketRequest() req: SocketRequestWithPlayer, @SocketIO() io: Server) { // logic } ```
### Description When sending a message that isn't proper JSON to a socket controller expecting a @MessageBody(), server throws an uncaught exception. **Minimal code-snippet showcasing the problem** ``` @SocketController('/chat') export...
### Description The error handling usually more complex than just replying with an error that happened to every invalid scenario. The `@EmitOnFail` decorator should support defining different messages to emit...
Hi, I discovered that NspParam(s) decorators crash if param is string. I checked the source code and I think it's most likely caused by one row in SocketControllerExecutor.ts. In function...
Is there any chance to create an Authorized-Decorator like in routing controllers? Would be nice, if you could limit the connections to only authorized users (directly at connect or at...
How i can use ssl for socket connection?
please add socket.io ack support like ```typescript @OnMessage('some-message') @ReturnAck() action ( @ConnectedSocket() socket: SocketIO.Socket, @MessageBody() msg: any) { return "aa" } @OnMessage('some-message-error') @ReturnAck() action2 ( @ConnectedSocket() socket: SocketIO.Socket, @MessageBody() msg:...