private void openTcpPort(tcpServer.TcpServer tcp, TextBox port) { tcp.Close(); tcp.Port = Convert.ToInt32(port.Text); port.Text = tcp.Port.ToString(); tcp.Open(); displayTcpServerStatus(); }
static void Main(string[] args) { Console.WriteLine("Start Listening Port:8080..."); SetConsoleCtrlHandler(cancelHandler, true); components = new System.ComponentModel.Container(); tcpServer1 = new tcpServer.TcpServer(components); tcpServer1.IdleTime = 50; tcpServer1.IsOpen = false; tcpServer1.MaxCallbackThreads = 100; tcpServer1.MaxSendAttempts = 3; tcpServer1.Port = -1; tcpServer1.VerifyConnectionInterval = 0; tcpServer1.OnConnect += new tcpServer.tcpServerConnectionChanged(tcpServer1_OnConnect); tcpServer1.OnDataAvailable += new tcpServer.tcpServerConnectionChanged(tcpServer1_OnDataAvailable); openTcpPort(); }
public Program() { this.tcpServer1 = new tcpServer.TcpServer(); btnChangePort_Click(null, null); iccount += frmMain_iccount; UDP_RecieverData.Instance.UDPReciever(); //this.tcpServer1.IdleTime = 50; //this.tcpServer1.IsOpen = false; //this.tcpServer1.MaxCallbackThreads = 100; //this.tcpServer1.MaxSendAttempts = 3; //this.tcpServer1.Port = -1; //this.tcpServer1.VerifyConnectionInterval = 0; this.tcpServer1.OnConnect += new tcpServer.tcpServerConnectionChanged(this.tcpServer1_OnConnect); this.tcpServer1.OnDataAvailable += new tcpServer.tcpServerConnectionChanged(this.tcpServer1_OnDataAvailable); }