code: public void close() throws IOException
    {
      DatagramSocket s = _s;
      _s = null;
  
      OutputStream os = _os;
      _os = null;
  
      InputStream is = _is;
      _is = null;
  
      try {
        if (os != null)
          os.close();
        
        if (is != null)
          is.close();
      } finally {
        if (s != null)
          s.close();
      }
    }
docs: Closes the underlying sockets and socket streams.