static void Main(string[] args) { _netService = new TcpSyncNetService(); ((TcpSyncNetService)_netService).Connected += new TcpSyncNetService.ConnectedHandler(OnConnected); ((TcpSyncNetService)_netService).OutputDataReceived += new TcpSyncNetService.LineReceivedHandler(OnInputAvailable); ((TcpSyncNetService)_netService).ClientDisconnected += OnClientDisconnected; _netService.Start(IPAddress.Loopback, 3002); }
static void Main() { // Application.EnableVisualStyles(); // Application.SetCompatibleTextRenderingDefault(false); // Application.Run(new Form1()); _netService = new TcpSyncNetService(); ((TcpSyncNetService)_netService).Connected += new TcpSyncNetService.ConnectedHandler(OnConnected); ((TcpSyncNetService)_netService).OutputDataReceived += new TcpSyncNetService.LineReceivedHandler(OnInputAvailable); ((TcpSyncNetService)_netService).ClientDisconnected += OnClientDisconnected; _netService.Start(IPAddress.Loopback, 3002); }