proto-socket/typescript/README.md
toki 5a2a21e75a 기능: TypeScript 패키지를 devDependencies로 통합하고 WebSocket 기능을 개선했다
- @bufbuild/protobuf를 dependencies에서 devDependencies로 이동
- ws를 peerDependencies에서 devDependencies로 이동
- node_ws_server.ts에 TLS 및 라우팅 기능 추가
- node_ws_client.ts에 TCP 클라이언트 통합 기능 추가
- message_common_pb.ts 프로토콜 버퍼 코드 재생성
- 크로스테스트 클라이언트 파일들 경로 업데이트
- 테스트 파일들 설정 업데이트
- 문서(PORTING_GUIDE, README) 업데이트
2026-05-20 11:22:04 +09:00

1.3 KiB

TypeScript Proto Socket

Status: planned

This package implements Proto Socket protocol version 0.1 for TypeScript.

Scope

  • Runtime targets: Node.js TCP, Node.js WebSocket, browser native WebSocket.
  • Browser entrypoint (proto-socket): Communicator, BaseClient, BrowserWsClient, connectBrowserWs. Has no ws, node:*, or Buffer dependency.
  • Node entrypoint (proto-socket/node): all of the above plus TcpClient/TcpServer, NodeWsClient/NodeWsServer, connectNodeWs/connectNodeWss using Node.js built-ins.

Import

// browser
import { connectBrowserWs } from "proto-socket";

// node
import { connectNodeWs, NodeWsServer, TcpClient } from "proto-socket/node";

Runtime Dependencies

The TypeScript runtime has no non-protobuf package dependencies. The current canonical message codec and Node.js TCP/TLS/WebSocket transports are implemented with native platform APIs, so this package has no runtime dependencies at all.

Proto Sync

The canonical schema lives in ../proto/message_common.proto. The TypeScript packet codec in src/packets/ must stay wire-compatible with that schema. After proto changes, run from the repository root:

tools/check_proto_sync.sh

Validation

cd typescript
npx tsc --noEmit
npx vitest run
cd go
go run ./crosstest/go_typescript.go