private static int Main2(string[] args) { tcpGateway = new TcpGateway(); ParseCommandLineArgs(args); tcpGateway.logger = new Logger(Console.Out, logLevel); tcpGateway.Open(); Console.WriteLine("Gateway started, press Enter to close."); Console.ReadLine(); tcpGateway.Close(); return(0); }
public static void Start() { tcpGateways = new ArrayList(); foreach (GatewayConfig c in gatewayConfigs) { TcpGateway tcpGateway = new TcpGateway(); tcpGateway.portNo1 = c.portNo1; tcpGateway.portNo2 = c.portNo2; tcpGateway.logger = logger; tcpGateway.Open(); tcpGateways.Add(tcpGateway); } }