com.alicizax.unity.network/Runtime/Network/INetworkModule.cs

22 lines
719 B
C#
Raw Normal View History

2025-03-24 13:17:26 +08:00
using AlicizaX;
2025-02-24 17:35:48 +08:00
using Cysharp.Threading.Tasks;
using Fantasy.Network;
2025-03-19 13:02:15 +08:00
using Fantasy.Network.Interface;
2025-02-24 17:35:48 +08:00
namespace AlicizaX.Network.Runtime
{
2025-03-20 20:47:48 +08:00
public interface INetworkModule : IModule
2025-02-24 17:35:48 +08:00
{
2025-03-19 13:02:15 +08:00
public EConnectState ConnectState { get; }
2025-03-18 19:41:26 +08:00
void SetHeartInterval(int heartInterval);
2025-02-24 17:35:48 +08:00
UniTask Initialize(params System.Reflection.Assembly[] assemblies);
void Connect(string remoteAddress, NetworkProtocolType networkProtocolType, bool isHttps);
2025-03-19 13:02:15 +08:00
UniTask<T> Call<T>(IRequest request, long routeId = 0) where T : IResponse;
void Send(IMessage message, uint rpcId = 0, long routeId = 0);
void Send(IRouteMessage routeMessage, uint rpcId = 0, long routeId = 0);
2025-02-24 17:35:48 +08:00
}
}