partial void ImplSendToPlayer(Player player, NetMessage msg, ReliabilityMode mode) { var lmsg = PlayerServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); PlayerServer.SendMessage(lmsg, player.Connection, method); }
partial void ImplSendExcept(NetMessage msg, Player except, ReliabilityMode mode) { var lmsg = PlayerServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); PlayerServer.SendToAll(lmsg, except.Connection, method, 0); }
protected internal override void SendToPlayers(NetMessage msg, ReliabilityMode mode) { var lmsg = _playerServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); _playerServer.SendToAll(lmsg, method); }
protected internal override void SendMessage(NetMessage msg, ReliabilityMode mode) { var lmsg = DispatchClient.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); DispatchClient.SendMessage(lmsg, method); }
partial void ImplSendToAll(NetMessage msg, ReliabilityMode mode) { var lmsg = _server.RoomServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); _server.RoomServer.SendToAll(lmsg, method); }
partial void ImplementationSendMessage(NetMessage msg, ReliabilityMode mode) { var lmsg = _room.DispatchClient.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); _room.DispatchClient.SendMessage(lmsg, method); }
protected internal override void SendToOtherRooms(Room except, NetMessage msg, ReliabilityMode mode) { var lmsg = RoomServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); RoomServer.SendToAll(lmsg, except.Connection as NetConnection, method, 0); }
protected internal override void SendToRoom(Room room, NetMessage msg, ReliabilityMode mode) { var lmsg = RoomServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); RoomServer.SendMessage(lmsg, room.Connection as NetConnection, method); }
partial void ImplSendToPlayers(Player[] players, NetMessage msg, ReliabilityMode mode) { var lmsg = PlayerServer.CreateMessage(msg.Data.Length); msg.Clone(lmsg); NetMessage.RecycleMessage(msg); var method = mode.RoomDelivery(); var conns = players.Where(p => p != null).Select(p => p.Connection).ToArray(); if (conns.Length == 0) { return; } PlayerServer.SendMessage(lmsg, conns, method, 0); }