public static void OnMessageReceived(Message message) { if (!connection2client.ContainsKey(message.connection)) { ConsoleSystem.LogError(string.Concat("EAC network packet from invalid connection: ", message.connection.userid)); return; } Client client = GetClient(message.connection); MemoryStream memoryStream = message.read.MemoryStreamWithSize(); easyAntiCheat.PushNetworkMessage(client, memoryStream.GetBuffer(), (int)memoryStream.Length); }
public static void OnMessageReceived(Message message) { if (!connection2client.ContainsKey(message.connection)) { Debug.LogError("EAC network packet from invalid connection: " + message.connection.userid); return; } EasyAntiCheat.Server.Hydra.Client client = GetClient(message.connection); byte[] buffer; int size; if (message.read.TemporaryBytesWithSize(out buffer, out size)) { easyAntiCheat.PushNetworkMessage(client, buffer, size); } }