2025-04-22 15:31:25 +08:00

243 lines
4.6 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package Fantasy.Network.Message;
// 协议分为:
// ProtoBuf:可以在Outer和Inner文件里使用。
// MemoryPack:可以在Outer和Inner文件里使用。
// Bson:仅支持在Inner文件里使用。
// 使用方式:
// 在message协议上方添加// Protocol+空格+协议名字
// 例如:// Protocol ProtoBuf 或 // Protocol MemoryPack
//Authentication
message C2A_RegisterRequest // IRequest,A2C_RegisterResponse
{
string Username = 1;
string Password = 2;
string Source = 3;
}
message A2C_RegisterResponse // IResponse
{
string Tag = 1;
}
message C2A_LoginRequest // IRequest,A2C_LoginResponse
{
string Username = 1;
string Password = 2;
string Source = 3;
}
message A2C_LoginResponse // IResponse
{
string Token = 1;
}
//Gate
message C2G_LoginRequest // IRequest,G2C_LoginResponse
{
string Token = 1;
}
message G2C_LoginResponse //IResponse
{
string Tag = 1;
GameAccountInfo GameAccount = 2;
}
message G2C_LoginRepeatedMessage //IMessage
{
}
message C2G_GetGameAccountInfo //IRequest , G2C_GetGameAccountInfo
{
int64 AccountId = 1;
}
message G2C_GetGameAccountInfo //IResponse
{
GameAccountInfo AccountInfo = 1 ;
}
message GameAccountInfo
{
int64 CreateTime = 1;
int64 LoginTime = 2 ;
string GameName = 3 ;
}
message G2C_OpenGameNameInputWindowsMessage //IMessage
{
string Tag = 1 ;
}
message C2G_UpdateAndSaveGameNameRequest //IRequest,G2C_UpdateAndSaveGameNameResponse
{
int64 AccountId = 1 ;
string GameName = 2 ;
}
message G2C_UpdateAndSaveGameNameResponse //IResponse
{
string Tag = 1;
}
//chat
message C2Chat_BoardMessageRequest //ICustomRouteRequest,Chat2C_BoardMessageResponse,ChatRoute
{
string Message = 1;
}
message Chat2C_BoardMessageResponse //ICustomRouteResponse
{
//string Message = 2;
}
message Chat2C_BoardMessage // ICustomRouteMessage,ChatRoute
{
string Message = 1;
}
message C2Chat_TestRequest // ICustomRouteRequest,Chat2C_TestResponse,ChatRoute
{
}
message Chat2C_TestResponse // ICustomRouteResponse
{
}
message C2G_TestMessage // IMessage
{
string Tag = 1;
}
message C2G_TestRequest // IRequest,G2C_TestResponse
{
string Tag = 1;
}
message G2C_TestResponse // IResponse
{
string Tag = 1;
}
message C2G_TestRequestPushMessage // IMessage
{
}
/// Gate服务器推送一个消息给客户端
message G2C_PushMessage // IMessage
{
string Tag = 1;
}
message C2G_CreateAddressableRequest // IRequest,G2C_CreateAddressableResponse
{
}
message G2C_CreateAddressableResponse // IResponse
{
}
message C2M_TestMessage // IAddressableRouteMessage
{
string Tag = 1;
}
message C2M_TestRequest // IAddressableRouteRequest,M2C_TestResponse
{
string Tag = 1;
}
message M2C_TestResponse // IAddressableRouteResponse
{
string Tag = 1;
}
/// 通知Gate服务器创建一个Chat的Route连接
message C2G_CreateChatRouteRequest // IRequest,G2C_CreateChatRouteResponse
{
}
message G2C_CreateChatRouteResponse // IResponse
{
}
/// 发送一个Route消息给Chat
message C2Chat_TestMessage // ICustomRouteMessage,ChatRoute
{
string Tag = 1;
}
/// 发送一个RPCRoute消息给Chat
message C2Chat_TestMessageRequest // ICustomRouteRequest,Chat2C_TestMessageResponse,ChatRoute
{
string Tag = 1;
}
message Chat2C_TestMessageResponse // ICustomRouteResponse
{
string Tag = 1;
}
/// 发送一个RPC消息给Map让Map里的Entity转移到另外一个Map上
message C2M_MoveToMapRequest // IAddressableRouteRequest,M2C_MoveToMapResponse
{
}
message M2C_MoveToMapResponse // IAddressableRouteResponse
{
}
/// 发送一个消息给Gate让Gate发送一个Addressable消息给MAP
message C2G_SendAddressableToMap // IMessage
{
string Tag = 1;
}
/// 发送一个消息给Chat让Chat服务器主动推送一个RouteMessage消息给客户端
message C2Chat_TestRequestPushMessage // ICustomRouteMessage,ChatRoute
{
}
/// Chat服务器主动推送一个消息给客户端
message Chat2C_PushMessage // ICustomRouteMessage,ChatRoute
{
string Tag = 1;
}
/// 客户端发送给Gate服务器通知map服务器创建一个SubScene
message C2G_CreateSubSceneRequest // IRequest,G2C_CreateSubSceneResponse
{
}
message G2C_CreateSubSceneResponse // IResponse
{
}
/// 客户端通知Gate服务器给SubScene发送一个消息
message C2G_SendToSubSceneMessage // IMessage
{
}
/// 客户端通知Gate服务器创建一个SubScene的Address消息
message C2G_CreateSubSceneAddressableRequest // IRequest,G2C_CreateSubSceneAddressableResponse
{
}
message G2C_CreateSubSceneAddressableResponse // IResponse
{
}
/// 客户端向SubScene发送一个测试消息
message C2SubScene_TestMessage // IAddressableRouteMessage
{
string Tag = 1;
}