- @bufbuild/protobuf를 dependencies에서 devDependencies로 이동 - ws를 peerDependencies에서 devDependencies로 이동 - node_ws_server.ts에 TLS 및 라우팅 기능 추가 - node_ws_client.ts에 TCP 클라이언트 통합 기능 추가 - message_common_pb.ts 프로토콜 버퍼 코드 재생성 - 크로스테스트 클라이언트 파일들 경로 업데이트 - 테스트 파일들 설정 업데이트 - 문서(PORTING_GUIDE, README) 업데이트
2.2 KiB
2.2 KiB
Implementation Checklist
Target protocol version: 0.1
Protocol Core
- Generated protobuf bindings from the canonical schema.
- Parser map registers application messages by protocol-compatible
typeName. - Built-in
HeartBeatregistration is owned by the framework. PacketBase.typeName,nonce,data, andresponseNoncesemantics matchPROTOCOL.md.- Same
typeNamecannot be registered for both normal listener and request listener on one connection. - Runtime dependencies beyond protobuf are avoided where practical; any required non-protobuf dependency is focused, proportional to the implemented feature, and documented with its purpose and native alternative review.
Transport
Transportabstraction exposes only packet write and close operations.Communicatordoes not know whether the connection is TCP, TLS+TCP, WS, or WSS.- TCP framing writes a 4-byte big-endian length followed by one
PacketBaseprotobuf payload. - TCP reader rejects zero-length packets as no-op and closes on invalid or oversized lengths.
- WebSocket reader/writer uses one binary frame per
PacketBasepayload. - TCP/TLS/WebSocket implementations prefer native platform APIs or the standard library over external packages.
- No broad framework or runtime layer is introduced solely to cover TCP/TLS/WebSocket transport.
- TLS+TCP and WSS are supported or explicitly marked unsupported with a reason.
Lifecycle
- Close is idempotent.
- Pending requests complete with an error when the connection closes.
- Writes are serialized so packet bytes cannot interleave.
- Read, write, heartbeat, and close errors converge on the same disconnect path.
Features
- Fire-and-forget send.
- Request-response send with timeout or cancellation.
- Concurrent requests route by
responseNonce. - Heartbeat sends after inactivity and closes after missing response.
- Server broadcast, if the language package exposes server helpers.
Verification
- Formatter/linter passes.
- Same-language TCP tests pass.
- Same-language WS tests pass.
- TLS/WSS tests pass where supported.
- Cross-language tests pass in both server/client directions.