static void Main(string[] args) { TcpClientHelper client = new TcpClientHelper("127.0.0.1", 3699); client.Start(); System.Threading.Tasks.Task task = new System.Threading.Tasks.Task(FileBackup, client); task.Start(); Console.Read(); }
public int SendMessage(string Msg) { TcpClientHelper client = new TcpClientHelper(ILL.GetConfig.CallServIp, ILL.GetConfig.CallServPort); try { client.Start(); client.SendMessage(Msg); return(1); } catch { return(-1); //MessageBox.Show("排队叫号系统出现如下错误:" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }