1
This commit is contained in:
@@ -29,6 +29,11 @@ namespace BITKit
|
||||
Message=6,
|
||||
Heartbeat=7,
|
||||
Ping=8,
|
||||
GetFromServer=9,
|
||||
GetFromClient=10,
|
||||
ReciveFile=11,
|
||||
ReturnToServer=12,
|
||||
ReturnToClient=13,
|
||||
}
|
||||
/// <summary>
|
||||
/// 网络提供服务,包括了基础网络服务,e.g
|
||||
@@ -67,10 +72,9 @@ namespace BITKit
|
||||
/// <summary>
|
||||
/// 从服务端获取数据
|
||||
/// </summary>
|
||||
/// <param name="addressablePath">可寻址路劲 e.g. Key</param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <returns></returns>
|
||||
UniTask<T> GetFromServer<T>(string addressablePath = Constant.System.Internal);
|
||||
UniTask<T> GetFromServer<T>(T command = default);
|
||||
|
||||
/// <summary>
|
||||
/// 从客户端获取数据
|
||||
@@ -79,7 +83,7 @@ namespace BITKit
|
||||
/// <param name="addressablePath">可寻址路劲 e.g. Key</param>
|
||||
/// <typeparam name="T">远程指令类型</typeparam>
|
||||
/// <returns></returns>
|
||||
UniTask<T> GetFromClient<T>(int id, string addressablePath = Constant.System.Internal);
|
||||
UniTask<T> GetFromClient<T>(int id,T command = default);
|
||||
|
||||
/// <summary>
|
||||
/// 添加RPC远程服务,服务类型为需要的方法标记[RPC]
|
||||
@@ -93,13 +97,19 @@ namespace BITKit
|
||||
/// <param name="handle">远程指令回调</param>
|
||||
/// <typeparam name="T">远程指令类型</typeparam>
|
||||
void AddCommandListener<T>(Action<T> handle);
|
||||
|
||||
/// <summary>
|
||||
/// 监听远程func
|
||||
/// </summary>
|
||||
/// <param name="func"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
void AddCommandListener<T>(Func<T,T> func);
|
||||
|
||||
/// <summary>
|
||||
/// 取消监听远程指令
|
||||
/// </summary>
|
||||
/// <param name="handle">远程指令回调</param>
|
||||
/// <typeparam name="T">远程指令类型</typeparam>
|
||||
void RemoveCommandListener<T>(Action<T> handle);
|
||||
void RemoveCommandListener<T>(Func<T,T> func);
|
||||
|
||||
/// <summary>
|
||||
/// 向服务端发送Rpc
|
||||
|
Reference in New Issue
Block a user