static void Main() { KMInterface mouseInterface = new KMInterface(); // Start UDP server UdpServer udpServer = new UdpServer(mouseInterface); Thread udpServerThread = new Thread(new ThreadStart(udpServer.StartUDPServer)); udpServerThread.IsBackground = true; udpServerThread.Start(); // start TCP server AsynchronousSocketListener tcpServer = new AsynchronousSocketListener(mouseInterface); Thread tcpServerThread = new Thread(new ThreadStart(tcpServer.StartTCPServer)); tcpServerThread.IsBackground = true; tcpServerThread.Start(); DisplayNotifyIcon(); Application.Run(); }
public UdpServer(KMInterface mouseInterface) { this.mouseInterface = mouseInterface; }