30-example-network-server — Game Protocol TS 서버 예제

Status: ACTIVE

181 stars

Best use case

30-example-network-server — Game Protocol TS 서버 예제 is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Status: ACTIVE

Teams using 30-example-network-server — Game Protocol TS 서버 예제 should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/30-example-network-server/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/30-example-network-server/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/30-example-network-server/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How 30-example-network-server — Game Protocol TS 서버 예제 Compares

Feature / Agent30-example-network-server — Game Protocol TS 서버 예제Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Status: ACTIVE

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 30-example-network-server — Game Protocol TS 서버 예제

Status: ACTIVE
AppliesTo: v10
Type: GUIDE

---

## Scope / Purpose

Game protocol 기반 TypeScript **서버** 예제.

Devian 네트워크 서버 조립 방식과 ServerRuntime 사용법을 보여준다.

---

## 경로 SSOT

| 구분 | 경로 |
|------|------|
| **Server** | `framework-ts/apps/GameServer/` |

---

## 핵심 조립 포인트

```typescript
import { WsTransport, NetworkServer } from '@devian/core';
import { createServerRuntime, Game2C } from '@devian/protocol-game/server-runtime';

// 1. Runtime 생성
const runtime = createServerRuntime();

// 2. Stub 획득 (핸들러 등록용)
const stub = runtime.getStub();

// 3. Transport 생성
const transport = new WsTransport({ port: PORT }, {
    onBinaryMessage: (sessionId, data) => server.onBinaryMessage(sessionId, data),
    // ...events
});

// 4. NetworkServer 생성
const server = new NetworkServer(transport, runtime, {
    onUnknownInboundOpcode: async (event) => {
        // unknown opcode 처리 (disconnect 없이 로깅만)
        console.warn(`Unknown opcode ${event.opcode}`);
    },
});

// 5. Outbound Proxy 생성 (타입 안전)
const game2cProxy = server.createOutboundProxy<Game2C.Proxy>();

// 6. Handler 등록
stub.onPing(async (sessionId, msg) => {
    await game2cProxy.sendPong(sessionId, { ... });
});
```

---

## 코덱 전환 (USE_JSON)

```typescript
import { defaultCodec as jsonCodec } from '@devian/core';

// false = Protobuf (default), true = Json
const USE_JSON = false;

const runtime = USE_JSON ? createServerRuntime(jsonCodec) : createServerRuntime();
```

- **기본값**: Protobuf (바이너리, 성능 우선)
- **Json 옵션**: 디버깅/테스트용

---

## 실행 방법

```bash
npm -w GameServer run start
```

---

## 설정

| 항목 | 기본값 | 비고 |
|------|--------|------|
| Port | `8080` | WsTransport 바인딩 포트 |
| Unknown opcode | 로깅만, disconnect 안함 | `onUnknownInboundOpcode` 훅 |

---

## Related

- [31-example-network-client](../31-example-network-client/SKILL.md) — Game Protocol TS 클라이언트 예제
- [03-ssot](../03-ssot/SKILL.md) — Example Apps SSOT
- [20-example-protocol-game](../20-example-protocol-game/SKILL.md) — Game Protocol 예제
- [Protocol SSOT](../../devian-protocol/03-ssot/SKILL.md) — Opcode/Tag, Protocol UPM

Related Skills

advanced-example

181
from majiayu000/claude-skill-registry

Advanced example showing all available metadata fields and complex folder structure

adf-json-example

181
from majiayu000/claude-skill-registry

Fetch raw ADF JSON data from a Confluence page URL. Use this skill when you need to see real-world ADF examples, understand how Confluence represents specific elements, debug ADF parsing, or create test samples.

add-vault-protocol

181
from majiayu000/claude-skill-registry

Add support for a new ERC-4626 vault protocol. Use when the user wants to integrate a new vault protocol like IPOR, Plutus, Morpho, etc. Requires vault smart contract address, protocol name, and protocol slug as inputs.

accessibility-games

181
from majiayu000/claude-skill-registry

Game accessibility skill for colorblind modes and control remapping.

acc-code-examples-template

181
from majiayu000/claude-skill-registry

Generates code examples for PHP documentation. Creates minimal, copy-paste ready examples with expected output.

ac-to-examples

181
from majiayu000/claude-skill-registry

将抽象的Acceptance Criteria(Given-When-Then)转换为具体的数值示例和真实对话,让AC对PM/客户/测试人员更易懂。适合在AC编写完成后、准备测试或向客户展示时使用,当AC格式正确但过于抽象时。帮助不熟悉BDD的PM/BA/测试人员理解测试场景,让AC从抽象规则变成可直接用于手动测试的具体步骤。

abstraction-concrete-examples

181
from majiayu000/claude-skill-registry

Use when explaining concepts at different expertise levels, moving between abstract principles and concrete implementation, identifying edge cases by testing ideas against scenarios, designing layered documentation, decomposing complex problems into actionable steps, or bridging strategy-execution gaps. Invoke when user mentions abstraction levels, making concepts concrete, or explaining at different depths.

GSTD A2A Network

181
from majiayu000/claude-skill-registry

Decentralized Agent-to-Agent Autonomous Economy. Connects hardware and agents for distributed compute, hive memory access, and economic settlement.

a2a-server-config

181
from majiayu000/claude-skill-registry

Agent-to-Agent (A2A) server configuration patterns for HTTP, STDIO, SSE, and WebSocket transports. Use when building A2A servers, configuring MCP transports, setting up server endpoints, or when user mentions A2A configuration, server transport, MCP server setup, or agent communication protocols.

a2a-protocol-impl

181
from majiayu000/claude-skill-registry

Implement Agent-to-Agent (A2A) protocol for inter-agent communication. Use for agent discovery, agent cards, task delegation, and multi-agent orchestration. Triggers on "A2A protocol", "agent-to-agent", "agent discovery", "agent card", "multi-agent", "agent delegation", "agent communication", or when implementing spec/api/017-a2a-protocol.md.

VoiceServer

181
from majiayu000/claude-skill-registry

Voice server management. USE WHEN voice server, TTS server, voice notification, prosody.

---name: biomcp-server

181
from majiayu000/claude-skill-registry

description: Open source biomedical Model Context Protocol (MCP) toolkit for connecting LLMs to biomedical data sources (PubMed, ClinicalTrials, Genomics).