You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
I am using the plugin for UDP multicast.
This is my code,
chrome.sockets.udp.create({ bufferSize: MAX_MSG_LENGTH }, function(createInfo) //Create socket entry
{
self.serverSocket = createInfo.socketId;
chrome.sockets.udp.setBroadcast(self.serverSocket, true, function(result) {
if (result < 0) {
console.log("setBroadcast failed");
}
});
chrome.sockets.udp.setMulticastTimeToLive(self.serverSocket, TTL, function(result) {
if (result < 0) {
console.log("MULTICAST FAILED" + result);
} else {
chrome.sockets.udp.bind(self.serverSocket, "0.0.0.0", MCAST_PORT, function(result) {
if (result < 0) {
console.log("BIND FAILED" + result);
chrome.sockets.udp.close(self.serverSocket);
} else {
chrome.sockets.udp.joinGroup(self.serverSocket, MCAST_IP_ADDR, function(result) {
if (result < 0) {
console.log("Couldn't join Group!");
chrome.sockets.udp.close(self.serverSocket);
} else {
chrome.sockets.udp.onReceive.addListener(function(msg) {
console.log(msg.socketId);
}
}
};
I have set Android Permissions
I use cordova 10.0.0 and Framework7 for developing the hybrid app.
I receive a message from my local browser on the UDP.onReceive.addEventListener, but not from the other devices.
Could you help me if I am missing something? Should I add any more permissions?
The text was updated successfully, but these errors were encountered: