Thank you for your interest in contributing to the Go implementation of Socket.IO at github.com/zishang520/socket.io!
To ensure a smooth collaboration process, please read the following guidelines before you get started.
- Before You Start
- Reporting Bugs
- Requesting Features
- Creating Pull Requests
- Project Structure
- Development Setup
- Useful Commands
- Our issues list is reserved for bug reports and feature requests.
- For general usage questions, please refer to:
- the documentation
- or open a discussion
- First, check if your issue already exists in the bug label.
- If it has been reported but closed and still persists, open a new issue instead of commenting on the old one.
- For security-related bugs, do not open a public issue. Refer to our security policy.
- Include Go module versions
- Specify the platform (OS, architecture)
- Provide a minimal reproducible example (see examples/docs)
- Check for similar feature requests in the enhancement list.
- If none exist, submit a new feature request.
Include:
- The problem you're trying to solve
- Your proposed solution
- Alternatives or workarounds considered
We welcome PRs for bug fixes, new features, and improvements.
- Reference the related issue (if any)
- Add test cases to prevent future regressions
- Ensure all existing tests pass
- Please open a feature request first to discuss it
- Include tests and documentation
- Make sure all tests pass before submitting
This is a Go monorepo. Each submodule is organized as an independent Go module:
| Go Module | Description |
|---|---|
github.com/zishang520/socket.io/v3 |
Root module defining shared types, interfaces, and entry points. |
github.com/zishang520/socket.io/servers/engine/v3 |
Engine.IO server: manages low-level communication via transports. |
github.com/zishang520/socket.io/clients/engine/v3 |
Engine.IO client: low-level transport connection to server. |
github.com/zishang520/socket.io/parsers/engine/v3 |
Engine.IO packet parser: encodes/decodes transport-level messages. |
github.com/zishang520/socket.io/servers/socket/v3 |
Socket.IO server: built on Engine.IO server for real-time, bidirectional communication. |
github.com/zishang520/socket.io/clients/socket/v3 |
Socket.IO client: built on Engine.IO client with rooms, namespaces, etc. |
github.com/zishang520/socket.io/parsers/socket/v3 |
Socket.IO packet parser: handles event-based message encoding/decoding. |
github.com/zishang520/socket.io/adapters/adapter/v3 |
Adapter interface: plug-and-play broadcast layer for multi-node communication. |
github.com/zishang520/socket.io/adapters/redis/v3 |
Redis-based adapter: enables pub/sub message broadcasting via Redis. |
github.com/zishang520/socket.io/adapters/valkey/v3 |
Valkey-based adapter: enables pub/sub message broadcasting via Valkey. |
github.com/zishang520/socket.io/adapters/postgres/v3 |
PostgreSQL-based adapter: enables pub/sub message broadcasting via PostgreSQL LISTEN/NOTIFY. |
github.com/zishang520/socket.io/adapters/mongo/v3 |
MongoDB-based adapter: enables pub/sub message broadcasting via MongoDB change streams. |
github.com/zishang520/socket.io/adapters/unix/v3 |
Unix Domain Socket-based adapter: enables low-latency message broadcasting across processes on the same machine. |
- Install Go version 1.26.0+
- Clone the repository and use Go Workspaces (
go work) to link submodules if needed
Format all workspaces:
make fmtFormat a specific workspace:
Windows:
make fmt servers/socketUnix:
make fmt MODULE=servers/socketRun all tests:
make testTest a specific workspace:
Windows:
make test servers/socketUnix:
make test MODULE=servers/socketFeel free to open an issue or discussion if you have any questions. Happy hacking! ✨