| name | socketio |
| description | Socket.io rooms, namespaces, adapters, middleware, and real-time patterns. |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| graph | {"domains":["domain:web-development"],"specializations":["specialization:web-development"],"skillAreas":["skill-area:websocket-design"],"roles":["role:backend-engineer","role:fullstack-engineer"],"topics":["topic:event-driven-architecture"]} |
Socket.io Skill
Expert assistance for building real-time applications with Socket.io.
Capabilities
- Configure Socket.io server
- Implement rooms and namespaces
- Use Redis adapter for scaling
- Handle authentication middleware
- Build event-driven patterns
- Implement acknowledgements
Usage
Invoke this skill when you need to:
- Build real-time applications
- Implement chat rooms
- Scale WebSocket servers
- Handle complex event patterns
Server Setup
import { Server } from 'socket.io';
import { createAdapter } from '@socket.io/redis-adapter';
import { createClient } ;
io = (httpServer, {
: { : },
});
pubClient = ({ : process.. });
subClient = pubClient.();
io.((pubClient, subClient));
io.( {
token = socket...;
{
socket. = (token);
();
} {
( ());
}
});
chatNamespace = io.();
chatNamespace.(, {
socket.(, {
socket.(roomId);
socket.(roomId).(, socket.);
});
socket.(, {
io.(roomId).(, {
: socket.,
content,
: .(),
});
});
});