syntax = "proto3"; package proto; service Plugin { rpc Call(Req) returns (Res) {} rpc SendFile(stream FileStream) returns (Res) {} rpc Chat(Req) returns (stream Res) {} } message Req { Header Header = 1; bytes Data = 2; } message Res { Header Header = 1; int32 Code = 2; string Desc = 3; bytes Data = 4; } message FileStream { Header Header = 1; string Name = 2; string Purpose = 3; int64 TotalSize = 4; int64 TotalPart = 5; int64 Part = 6; bytes Data = 7; } message Header { string UUID = 1; int64 Timestamp = 2; string From = 3; string To = 4; string Func = 5; }