/// <summary> /// stop consuming/receiving data /// </summary> /// <returns></returns> public bool StopConsuming() { try { Client.Close(); Client = null; Consumer = null; Consuming = false; return(true); } catch (Exception ex) { Trace.WriteLine(ex.ToString()); } return(false); }
/// <summary> /// stop consuming/receiving data /// </summary> /// <returns></returns> public bool StopConsuming() { try { Client.Close(); Client = null; Consumer = null; Consuming = false; return true; } catch(Exception ex) { Trace.WriteLine(ex.ToString()); } return false; }
/// <summary> /// start conuming/recieving data /// </summary> /// <param name="port"></param> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(int port, INetComConsumer consumer) { try { Consumer = consumer; Client = new UdpClient(port); Client.DontFragment = true; Client.BeginReceive(new AsyncCallback(ReceivePacket), null); Consuming = true; return(true); } catch (Exception ex) { Trace.WriteLine(ex.ToString()); } return(false); }
/// <summary> /// start conuming/recieving data /// </summary> /// <param name="port"></param> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(int port, INetComConsumer consumer) { try { Consumer = consumer; Client = new UdpClient(port); Client.DontFragment = true; Client.BeginReceive(new AsyncCallback(ReceivePacket), null); Consuming = true; return true; } catch (Exception ex) { Trace.WriteLine(ex.ToString()); } return false; }
/// <summary> /// start conuming/recieving data /// </summary> /// <param name="port"></param> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(int port, INetComConsumer consumer) { //try //{ // Consumer = consumer; // Client = new TcpClient(port); // Client.DontFragment = true; // Client.BeginReceive(new AsyncCallback(ReceivePacket), null); // Consuming = true; // return true; //} //catch (Exception ex) //{ // Trace.WriteLine(ex.ToString()); //} return(false); }
/// <summary> /// start conuming/recieving data /// </summary> /// <param name="port"></param> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(int port, INetComConsumer consumer) { //try //{ // Consumer = consumer; // Client = new TcpClient(port); // Client.DontFragment = true; // Client.BeginReceive(new AsyncCallback(ReceivePacket), null); // Consuming = true; // return true; //} //catch (Exception ex) //{ // Trace.WriteLine(ex.ToString()); //} return false; }
public bool StartConsuming(int port, INetComConsumer consumer) { try { if (Consuming) return false; eventStop.Reset(); PortSubscribe = port; threadMessaging = new Thread(new ThreadStart(ZMQReceiver)); threadMessaging.Start(); Consuming = true; return true; } catch (System.Exception ex) { Trace.WriteLine(ex.ToString()); } return false; }
public bool StartConsuming(int port, INetComConsumer consumer) { try { if (Consuming) { return(false); } eventStop.Reset(); PortSubscribe = port; threadMessaging = new Thread(new ThreadStart(ZMQReceiver)); threadMessaging.Start(); Consuming = true; return(true); } catch (System.Exception ex) { Trace.WriteLine(ex.ToString()); } return(false); }
public bool StartConsuming(INetComConsumer consumer) { return StartConsuming(PortSubscribe, consumer); }
/// <summary> /// start consuming/receiving data with internal port /// </summary> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(INetComConsumer consumer) { return(StartConsuming(PortIn, consumer)); }
public bool StartConsuming(INetComConsumer consumer) { return(StartConsuming(PortSubscribe, consumer)); }
/// <summary> /// start consuming/receiving data with internal port /// </summary> /// <param name="consumer"></param> /// <returns></returns> public bool StartConsuming(INetComConsumer consumer) { return StartConsuming(PortIn, consumer); }