com.alicizax.unity.network/Runtime/Network/INetworkModule.cs
2025-03-24 13:17:26 +08:00

22 lines
719 B
C#

using AlicizaX;
using Cysharp.Threading.Tasks;
using Fantasy.Network;
using Fantasy.Network.Interface;
namespace AlicizaX.Network.Runtime
{
public interface INetworkModule : IModule
{
public EConnectState ConnectState { get; }
void SetHeartInterval(int heartInterval);
UniTask Initialize(params System.Reflection.Assembly[] assemblies);
void Connect(string remoteAddress, NetworkProtocolType networkProtocolType, bool isHttps);
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);
}
}