code: private void openAndBindSocket() {
      try {
        this.clientSocket = new MulticastSocket();
        Utils.selectAppropriateInterface(clientSocket);
        this.clientSocket.joinGroup(SsdpParams.getSsdpMulticastAddress());
      } catch (IOException e) {
        callback.onFailed(e);
      }
    }
docs: Open MulticastSocket and bind to Ssdp port.