public EsfTcpListener(int port, string ip) { this.tcpListener = new TcpListener(IPAddress.Parse(ip), port); this.tcpListener.Start(); CbSimple cb = new CbSimple(this.ListenThreadMethod); cb.BeginInvoke(null, null); }
public EsfTcpListener(int port) { this.tcpListener = new TcpListener(port); this.tcpListener.Start(); CbSimple cb = new CbSimple(this.ListenThreadMethod); cb.BeginInvoke(null, null); }
public void Initialize() { this.gotoDispose = false; this.disposeDoneEvent.Reset(); this.queueOfCanDiscarded = new FixQueue <byte[]>(this.queueSizeOfDiscarded); this.queueOfCanDiscarded.ObjectDiscarded += new CbGeneric <byte[]>(queueOfCanDiscarded_ObjectDiscarded); CbSimple cb = new CbSimple(this.WorkThread); cb.BeginInvoke(null, null); }
public void Initialize() { this.gotoDispose = false; this.disposeDoneEvent.Reset(); this.recieveHeaderBuff = new byte[this.contractHelper.MessageHeaderLength]; this.tcpAutoSender.ConnectionInterrupted += new CbSimple(tcpAutoSender_ConnectionInterrupted); this.tcpAutoSender.Initialize(); CbSimple cb = new CbSimple(this.WorkThread); cb.BeginInvoke(null, null); }
public void Excute() { if (this.running) { return; } this.running = true; CbSimple cb = new CbSimple(this.Worker); cb.BeginInvoke(new AsyncCallback(WorkerCallBack), null); }
public void Start() { if (!this.stop) { return; } this.stop = false; this.esfTcpListener.Start(); CbSimple cb = new CbSimple(this.TaskChecker); cb.BeginInvoke(null, null); }
public void Initialize(ArrayList aptDataInfos, DataBaseType dbType, int updateMinutes) { this.aptoticDataInfoList = aptDataInfos; this.curDbType = dbType; this.dbAccesserFactory = new DBAccesserFactory(); this.dbAccesserFactory.Initialize(dbType, null, false); this.LoadInitialData(); if ((updateMinutes != -1) && (updateMinutes > 0)) { this.refreshMinute = updateMinutes; CbSimple cback = new CbSimple(this.RefreshThread); cback.BeginInvoke(null, null); } }
public void Initialize() { int count = 0; label : try { #region 择IP IPEndPoint localIPE = null; if (this.autoOnPublicIPAddress) { string publicIP = NetHelper.GetLocalPublicIp(); if (publicIP != null) { localIPE = new IPEndPoint(IPAddress.Parse(publicIP), this.port); } } if (localIPE == null) { this.udpClient = new UdpClient(this.port); } else { this.udpClient = new UdpClient(localIPE); } #endregion } catch { if (count < 10) { ++this.port; ++count; goto label; } else { throw; } } this.goToDispose = false; this.stopEvent.Reset(); CbSimple cb = new CbSimple(this.Worker); cb.BeginInvoke(null, null); }
public virtual void Start() { this.totalSleepCount = this.detectSpanInSecs * 1000 / BaseCycleEngine.SleepTime; if (this.detectSpanInSecs < 0) { return; } if (!this.isStop) { return; } this.manualResetEvent4Stop.Reset(); this.isStop = false; ESBasic.CbSimple cb = new CbSimple(this.Worker); cb.BeginInvoke(null, null); }