Skip to content

[codex] Phase 1: Protobuf Socket.IO wire format - #2

Draft
seungkilee-spherecorp wants to merge 1 commit into
seungkilee-cs:phase-0-proto-foundationsfrom
seungkilee-spherecorp:phase-1-protobuf-wire
Draft

[codex] Phase 1: Protobuf Socket.IO wire format#2
seungkilee-spherecorp wants to merge 1 commit into
seungkilee-cs:phase-0-proto-foundationsfrom
seungkilee-spherecorp:phase-1-protobuf-wire

Conversation

@seungkilee-spherecorp

Copy link
Copy Markdown

Summary

Moves Socket.IO signaling, chat, and room events onto protobuf-encoded payloads.

Branches

  • Base: phase-0-proto-foundations
  • Head: seungkilee-spherecorp:phase-1-protobuf-wire

Validation

Not rerun for this historical branch during this docs pass; PR created from the existing branch content.

Notes

Direct PR creation from the upstream branch was rejected for the active GitHub CLI account with must be a collaborator, so this draft PR uses the active account's fork while preserving the same branch content.

…obuf

Phase 1: replace JSON payloads on the realtime path with binary Protocol
Buffer frames generated from the shared schema. Event names are unchanged;
only the payload encoding moves from JSON to protobuf bytes.

- server: every VideoGateway handler decodes a typed proto frame and every
  emit encodes one. New common/proto/proto-codec.ts wraps encode/decode and
  guards against non-binary input (throws WsException instead of crashing).
- restore the content length check (1-500 chars) the JSON ValidationPipe
  enforced on CreateMessageDto, now done explicitly after decode.
- add WebRTCError / CallError / MessageError messages for the error channels.
- client: socket service and useWebRTCMesh encode on emit and decode on
  receive via services/protoCodec.ts; the service's public API is unchanged
  so ChatRoom / App / VideoChatMesh need no edits.
- timestamps are serialized as ISO strings on the wire.
- proto-codec.spec.ts covers round-trip, Buffer input, and malformed frames.

The legacy one-to-one useWebRTC.ts / VideoChat.tsx are unmounted and still
send JSON; they are removed in Phase 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants