Skip to content

feat: add basic ws messaging #538

Open
4 of 4 issues completed
Open

Description

@electrohyun

Problem

Track basic in-memory ws support within the v2 direction. This issue groups the runtime, public-type, and package work. Each implementation PR should close its own sub-issue.

Proposed API

import WebSocket, { WebSocketServer } from 'smocket/ws';

const server = new WebSocketServer({ port: 3000 });
server.on('connection', (socket) => {
  socket.on('message', (data) => socket.send(data.toString()));
});

const client = new WebSocket('ws://localhost:3000');
client.onopen = () => client.send('hello');
client.onmessage = () => client.close();

This is the target package usage. The internal runtime in #580 does not provide the public entry point; package binding belongs to #562.

Socket.IO behavior

Keep existing Socket.IO behavior unchanged. Follow real ws for the supported application APIs and observable behavior, within ADR 0044 and the CommonJS export decision in ADR 0045.

Scope check

  • This is not reconnection, transport fallback, heartbeat, Redis multi-server, or binary encoding

Tasks

Client tracking and multi-client application examples remain in #539. Byte inputs, send callbacks, and detailed failure/concurrent-close behavior remain in #540. Shared-core extraction in #541 follows the ws work and does not block it.

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    enhancement
    needs decision
    on Oct 1, 2026
  2. changed the title [-]feat: add ws environment and basic browser messaging[/-] [+]feat: add basic ws messaging[/+] on Oct 1, 2026
  3. self-assigned this
    on Oct 2, 2026
  4. removed
    needs decision
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

  • Status
    Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions