creating-server-protocol

Solid

moorestechサーバーのプロトコル(Request-Response型・Event型)を作成するためのガイド。 Use when: 1. 新しいサーバープロトコル(IPacketResponse)を実装する時 2. 新しいイベントパケット(EventPacket)を実装する時 3. 「プロトコルを作って」「パケットを追加して」と依頼された時 4. クライアント-サーバー間の通信を新規追加する時

API & Backend 75 stars 10 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 76/100

Stars 20%
63
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# サーバープロトコル作成ガイド ## プロトコル選択 | 条件 | 種類 | |------|------| | クライアントが明示的に情報を要求/操作を実行 | **Request-Response型** | | サーバー側の状態変化をクライアントに通知 | **Event型** | 詳細パターンとコード例: [references/protocol-patterns.md](references/protocol-patterns.md) を参照。 ## Request-Response型の作成手順 ### Step 1: プロトコルクラスを作成 `moorestech_server/Assets/Scripts/Server.Protocol/PacketResponse/` に新規ファイルを作成。 ```csharp using System; using System.Collections.Generic; using MessagePack; using Server.Protocol; namespace Server.Protocol.PacketResponse { public class YourProtocol : IPacketResponse { public const string ProtocolTag = "va:yourProtocol"; private readonly ISomeDependency _dependency; public YourProtocol(ServiceProvider serviceProvider) { _dependency = serviceProvider.GetService<ISomeDependency>(); } public ProtocolMessagePackBase GetResponse(byte[] payload) { var data = MessagePackSerializer.Deserialize<YourRequestMessagePack>(payload); // ビジネスロジック return new YourResponseMessagePack(/* result */); } #region MessagePack [MessagePackObject] public class YourRequestMessagePack : ProtocolMessagePackBase { // Key(0)=Tag, Key(1)=SequenceId は基底クラスで予約済み [Key(2)] public int SomeField { get; set; } [Obsolete("デシリアライズ用のコンストラクタです。基本的に使用しないでください。")] public YourRequestMessagePack() { } public YourRequestMessageP...

Details

Author
moorestech
Repository
moorestech/moorestech
Created
5 years ago
Last Updated
today
Language
C#
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

distill-protocol

蒸馏协议:为个人数字资料生成人类可读条款与机器可读 manifest;戏称「牛马保护法」仅为传播梗,非法律意见。

449 Updated 1 months ago
agenmod
Web & Frontend Solid

create-spec

ユーザーと対話しながら機能仕様を策定し、Notion に自動でドキュメント化するスキル。「仕様を作ろう」「スペックを書いて」「仕様を詰めよう」などの指示で呼び出される。

14 Updated 2 days ago
suzuki3jp
AI & Automation Featured

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

9,994 Updated today
mcp-use
API & Backend Solid

form-patterns

Паттерны модуля формы (клиент-серверное взаимодействие). Этот навык учит агента правильно писать код модулей управляемых форм 1С.

65 Updated today
SteelMorgan