Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Problem
#538 needs an internal runtime before the public smocket/ws entry points can be connected. Implement the basic connection, text messaging, and normal-close behavior independently of package binding.
Proposed API
The internal constructors should support handlers such as:
server.on('connection', (socket) => {
socket.on('message', (data) => socket.send(data.toString()));
});
client.onopen = () => client.send('hello');
client.onmessage = () => client.close();Socket.IO behavior
Keep existing Socket.IO behavior unchanged. Use real ws as the reference for the selected application-visible behavior in ADR 0044 and run the same comparison cases against both implementations.
Scope check
- This is not reconnection, transport fallback, heartbeat, Redis multi-server, or binary encoding
Tasks
- Add isolated virtual server registration, asynchronous connection, text exchange, normal close, and registration cleanup without creating HTTP/TCP connections.
- Support host/port/path matching, local host aliases,
port: 0,address(), and the separate constructor callback receiver'sthis.address(). - Supply basic
request.url,request.method, and automaticrequest.headerson connection. - Support the selected EventEmitter methods, event handler properties, event listeners, and URL/close argument validation, with runtime and type comparisons.
- Verify repeated connection/close cycles and preserve the existing Socket.IO tests.
This is the internal-runtime sub-issue of #538. Public entry points and generated package declarations remain in #562; client tracking and application examples in #539; byte inputs, send callbacks, and detailed failure/concurrent-close behavior in #540; shared-core extraction in #541.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Type
Projects
- StatusShow more project fieldsDone
Activity