core/services/socket/ — Socket.IO Service

Community

Single shared Socket.IO connection manager

AuthorVantoan252003
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill centralizes management of a single Socket.IO WebSocket connection for the Flutter client, preventing duplicated connections and simplifying real-time order tracking and event handling across the app.

Core Features & Use Cases

  • Singleton lifecycle management: maintain one global socket, connect on login and disconnect on logout.
  • Authenticated handshake & reconnection: perform JWT-authenticated handshake with Authorization headers and automatic reconnection with configured attempts and delay.
  • Room management & typed event streams: join and leave per-order rooms, emit events, and expose broadcast streams with typed parsers plus a convenience Map parser.
  • Use Case: A TrackingBloc joins an order room, subscribes to driverLocation and orderStatusChange streams filtered by orderId, and updates UI state in real time.

Quick Start

Use the socket service to connect with the user's JWT, join the room for a given orderId and orderType, and subscribe to driverLocation and orderStatusChange events filtered for that order.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: core/services/socket/ — Socket.IO Service
Download link: https://github.com/Vantoan252003/Mozi/archive/main.zip#core-services-socket-socket-io-service

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.