public RecordEvent ( EventType type, string evt ) : void | ||
type | EventType | |
evt | string | |
Результат | void |
public void AcceptClient(TcpClient client) { IPEndPoint ep = client.Client.RemoteEndPoint as IPEndPoint; byte[] bytes = ep.Address.GetAddressBytes(); uint addr = (uint)(bytes[0] << 24) | (uint)(bytes[1] << 16) | (uint)(bytes[2] << 8) | bytes[3]; if (!mBlacklist.ContainsKey(addr)) { Client c = new Client(client, this); mEventLog.RecordEvent(EventLog.EventType.Network, string.Format("New connection from: {0}", ep.Address.ToString())); mClientListMutex.WaitOne(); mClients.Add(c); mClientListMutex.ReleaseMutex(); } }