/// <summary>
 /// Closes the UDP socket.
 /// </summary>
 public void Close()
 {
     // Close the socket
     if (socket != null)
     {
         socket.Stop();
     }
 }