Methods
close()
Close the UDP socket.
- Source:
getHostName() → {string}
Return the host name of the machine.
So far, I've been unable to determine how to do this, and returning the IP number instead.
- Source:
Returns:
host name
- Type
- string
getIPAddress() → {string}
Return the IP address of the machine.
- Source:
Returns:
IP address
- Type
- string
listen(inCallback)
Listen for packets on the UDP socket.
Parameters:
Name | Type | Description |
---|---|---|
inCallback |
function | function to call on reception |
- Source:
open(inCallback)
Open the MDNS socket and join the multicast group.
Note only one UDP socket per strategy instance.
Parameters:
Name | Type | Description |
---|---|---|
inCallback |
function | function to call on completion |
- Source:
send(inPacket, inRemoteAddress, inRemotePort)
Send a packet on the UDP socket.
Parameters:
Name | Type | Description |
---|---|---|
inPacket |
ArrayBuffer | packet |
inRemoteAddress |
string | remote address |
inRemotePort |
port | remote port |
- Source: