PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Prompts matching the #websocket tag
Enable real-time features with Socket.io. Implementation: 1. Server-side io instance. 2. Client-side connection. 3. Emit and on for events. 4. Rooms for group messaging. 5. Broadcasting to multiple clients. 6. Acknowledgements for reliability. 7. Middleware for authentication. 8. Automatic reconnection. Use with Redis adapter for scaling across servers and implement presence detection.
Create a real-time chat application using Svelte 5's new runes. Requirements: 1. Use $state and $derived runes for reactive messages. 2. WebSocket connection with auto-reconnect. 3. Typing indicators with $effect rune. 4. Message grouping by date dividers. 5. Infinite scroll for message history. 6. File upload with drag-and-drop. 7. Emoji picker integration. 8. Read receipts and online status. Style with SvelteKit and use server-sent events for presence.
Implement WebSocket for real-time features. Use cases: 1. Chat applications. 2. Live notifications. 3. Collaborative editing. 4. Live data dashboards. 5. Gaming multiplayer. 6. Stock tickers. Implementation: Establish connection, send/receive messages, handle disconnect, reconnect logic, heartbeat/ping-pong, scale with Redis pub/sub, authentication at connection. Use Socket.io or native WebSocket API.