public class HTTPMUSocket extends Object
This class provides multicast socket functionality specifically designed for SSDP operations in UPnP networks. It handles both sending and receiving multicast UDP packets for device discovery and advertisement.
Key features:
This class is used by SSDP components to send multicast discovery messages and receive multicast advertisements from UPnP devices, enabling the core device discovery functionality in UPnP networks.
| Constructor and Description |
|---|
HTTPMUSocket() |
HTTPMUSocket(String addr,
int port,
String bindAddr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close() |
protected void |
finalize() |
String |
getLocalAddress() |
int |
getLocalPort() |
String |
getMulticastAddress() |
InetAddress |
getMulticastInetAddress() |
int |
getMulticastPort() |
MulticastSocket |
getSocket() |
boolean |
open(String addr,
int port,
InetAddress bindAddr) |
boolean |
open(String addr,
int port,
String bindAddr) |
boolean |
post(HTTPRequest req) |
boolean |
post(HTTPRequest req,
String bindAddr,
int bindPort) |
SSDPPacket |
receive() |
boolean |
send(String msg) |
boolean |
send(String msg,
String bindAddr,
int bindPort) |
String |
toString()
I2P
|
public boolean close()
public String getLocalAddress()
public int getLocalPort()
public String getMulticastAddress()
public InetAddress getMulticastInetAddress()
public int getMulticastPort()
public MulticastSocket getSocket()
MulticastSocketpublic boolean open(String addr, int port, InetAddress bindAddr)
addr - String rappresenting the multicast hostname to join into.port - int rappresenting the port to be use poth as source and destinationbindAddr - InetAddress which identify the hostname of the interface to use for
sending and recieving multicast packetpublic boolean post(HTTPRequest req)
public boolean post(HTTPRequest req, String bindAddr, int bindPort)
public SSDPPacket receive() throws IOException
IOExceptionpublic boolean send(String msg)