Multicast(IList<Player> clients, bool reliable, RPCModel model)
public virtual void Multicast(IList<Player> clients, bool reliable, RPCModel model)
{
for (int i = 0; i < clients.Count; i++)
{
var client = clients[i];
if (client == null)
continue;
if (client.CloseSend)
continue;
if (!reliable)
{
if (client.udpRPCModels.Count >= ushort.MaxValue)
{
Debug.LogError($"[{client.UserID}]数据缓存列表超出限制!");
return;
}
client.udpRPCModels.Enqueue(model);
}
else
{
if (client.tcpRPCModels.Count >= ushort.MaxValue)
{
Debug.LogError($"[{client.UserID}]数据缓存列表超出限制!");
return;
}
client.tcpRPCModels.Enqueue(model);
}
}
}
上一页Multicast(IList<Player> clients, bool reliable, byte cmd, byte[] buffer, bool kernel, bool serialize下一页Multicast(IList<Player> clients, string func, params object[] pars)
最后更新于
这有帮助吗?