Skip to content

Why Zocket?

This documents the old v1 API. See Getting Started for the current version.

FeatureSocket.ioZocket
Type SafetyPartial (via manual interfaces)End-to-End Inferred
ValidationManualBuilt-in (Zod/Valibot)
Developer ExperienceEvent strings ("chat:msg")Fluent API (client.chat.msg)

In Socket.io, you define interfaces on both client and server manually. Zocket infers types directly from your router.

With Raw WebSockets you have to build protocol parsing, routing, room management, and type safety yourself. Zocket provides structured routing, rooms, and validation out of the box.

Use Zocket if you use TypeScript and want tRPC-like DX for WebSockets. Use Socket.io if you need HTTP long-polling fallbacks or use JavaScript without types.