/// <summary> /// Sends a text message to corresponding listener /// </summary> /// <param name="message"></param> /// <returns>true - if the message is sent successfully</returns> public bool Send(UdpMessage message) { bool success = true; try { udpport1.DataToSend = UdpMessage.Convert(message); } catch (Exception e) { success = false; Debug.WriteLine(e.ToString()); } return(success); }
private void udpport2_OnDataIn(object sender, nsoftware.IPWorks.UdpportDataInEventArgs e) { MessageRcvd(UdpMessage.Convert(e.Datagram)); } //Throw a public event