/// <summary> /// Disconnect from the receive processor and fire the Closed event. /// </summary> protected void OnClosed() { receiveProcessor = null; if (Closed != null) { Closed(this, EventArgs.Empty); } }
/// <summary> /// Create a receive processor and fire the Opened event. /// </summary> protected void OnOpened() { receiveProcessor = new ReceiveProcessor(this); if (Opened != null) { Opened(this, EventArgs.Empty); } }
static void Main(string[] args) { IReceiveProcessor receiver = ReceiveProcessor.GetInstance(); receiver.Register(GetIESMsg, EnumMsgType.IES); receiver.Start("10.130.36.225", 8013); receiver.Register(GetLIVEMsg, EnumMsgType.LIVE); receiver.Start("10.130.36.225", 9555); Console.ReadKey(); }