You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
1 month ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using System.IO.MemoryMappedFiles;
|
||
|
|
||
|
namespace Sog.IO
|
||
|
{
|
||
|
|
||
|
//通过共享命令发送服务器指令,每个服务器ID一个
|
||
|
//服务器管理通过这个,比如 stop, reload, 服务器管理指令和gm指令的支持
|
||
|
//方法是游戏正常进程(SogLoader)启动会创建,其他模式启动的SogLoader通过写操作实现进程间通信
|
||
|
//实现支持跨平台的方法
|
||
|
//进程间通信的指令使用字符串,方便扩展和其他工具集成使用
|
||
|
// 4byte[length] strcommand strparam1 strparam2 ...
|
||
|
// 读写操作不加锁,所以暂时只支持同时存在一条指令,后期可优化扩展
|
||
|
public interface IShareCommand
|
||
|
{
|
||
|
//释放资源
|
||
|
void Close();
|
||
|
//删除文件
|
||
|
void DeleteFile();
|
||
|
|
||
|
//App启动时创建
|
||
|
void Create();
|
||
|
|
||
|
//辅助模式则attach
|
||
|
bool Attach();
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
bool WriteCommand(string strCommand);
|
||
|
bool WriteAck(string strAck);
|
||
|
string ReadCommand();
|
||
|
string ReadCommandAck();
|
||
|
}
|
||
|
}
|