Skip to content

When specifying the SSDP Search port as 1900, some devices do not respond #40

@RuralTree

Description

@RuralTree
/**
 * Open MulticastSocket and bind to Ssdp port.
 *
 * @param options
 */
private void openAndBindSocket(SsdpClientOptions options) {
    try {

//There is no need to set a UDP send port here, as some devices do not respond to the SSDP query protocol after 1900. If other ports are set, also check if the ports are available. Here, the system can randomly specify a port
this.clientSocket = new MulticastSocket(options.getBindingPort());

this.clientSocket.setReuseAddress(true);
interfaces = Utils.getMulticastInterfaces();
joinGroupOnAllInterfaces(SsdpParams.getSsdpMulticastAddress(), options.getIgnoreInterfaceDiscoveryErrors());
} catch (IOException e) {
callback.onFailed(e);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions