Adding stop method to shutdown UDP socket