[codex] Phase 1: Protobuf Socket.IO wire format - #2
Draft
seungkilee-spherecorp wants to merge 1 commit into
Draft
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves Socket.IO signaling, chat, and room events onto protobuf-encoded payloads.
Branches
phase-0-proto-foundationsseungkilee-spherecorp:phase-1-protobuf-wireValidation
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.