Is there some kind of design document for the
chrome.socket API? If not, I'd like to propose the following extension in order to fully support multicast:
Either several high-level wrapper functions:
chrome.socket.joinGroup(int socketId, string groupAddress, function callback)
chrome.socket.leaveGroup(int socketId, string groupAddress, function callback)
chrome.socket.blockSource(int socketId, string sourceAddress, function callback)
chrome.socket.unblockSource(int socketId, string sourceAddress, function callback)
chrome.socket.setAllowReuse(int socketId, bool allowReuse, function callback)
...
Or one low-level function and several allowed socket options:
chrome.socket.setSocketOption(int socketId, int option, object withWhateverParametersAreNeeded, function callback)
chrome.socket.MCAST_JOIN_GROUP
chrome.socket.MCAST_BLOCK_SOURCE
...
What do you think?