public override void Run() { try { string strMsg = ""; if (!m_udpListener.MsgReceived(strMsg)) { Thread.Sleep(1000); return; } Log.Log_Debug(strMsg); WebSvr ws = new WebSvr(GShare.cstIPAddress, GShare.cnPortForTaskManager); string strSend = "TaskManger, this is ParseData speaking." + DateTime.Now.ToString("HH:mm:ss"); ws.SendMessage(strSend); Thread.Sleep(1000); } catch (SystemException e) { Log.Log_Fatal(e.Message); } }
public void Run() { int nPort = 0; if (m_reqParam.m_enJobStatus == GShare.JobStatus.eUndefined) { nPort = GShare.cnPortForParseData; m_reqParam.m_enJobStatus = GShare.JobStatus.eBegin; } else { nPort = GShare.cnPortForUI; } WebSvr ws = new WebSvr(GShare.cstIPAddress, nPort); ws.SendMessage(m_reqParam.GetXml()); return; }
void SendStatusReport( int nCount, int nTotalCount, string strCurrentFile ) { StatusReportParameter status = new StatusReportParameter(nCount, nTotalCount, strCurrentFile); WebSvr ws = new WebSvr(GShare.cstIPAddress, GShare.cnPortForTaskManager); ws.SendMessage(status.GetXml()); }
private void ClickParseKLineDayButton(object sender, RoutedEventArgs e) { StreamReader sr = new StreamReader(".\\Config\\ImportKLineData_Day.xml"); string strXml = sr.ReadToEnd(); WebSvr ws = new WebSvr(GShare.cstIPAddress, GShare.cnPortForTaskManager); ws.SendMessage(strXml); MsgReceived.Text = "Waiting for response..."; ThreadPool.QueueUserWorkItem(new WaitCallback(MsgWatchingThread)); return; }