in GameLiftExampleUnityProject/Assets/Scripts/Server/Server.cs [363:383]
public void TransmitMessage(SimpleMessage msg, TcpClient excludeClient = null)
{
// send the same message to all players
foreach (var client in this.clients)
{
//Skip if this is the excluded client
if(excludeClient != null && excludeClient == client.Key)
{
continue;
}
try
{
NetworkProtocol.Send(client.Key, msg);
}
catch (Exception e)
{
this.clientsToRemove.Add(client.Key);
}
}
}