code: protected void close() {
          guard.close();
  
          if (fd != null) {
              datagramSocketClose();
              ResourceManager.afterUdpClose();
              fd = null;
          }
      }
docs: Close the socket.