UDP Client Event - OnException

The event is raised when an exception is caught internally or the Connect method fails.

 

udp.OnException += OnUdpException;

private void OnUdpException(int errorCode, string errorMessage)
{
  // Handle the exception here