Chromium Code Reviews| Index: chrome/common/extensions/api/socket.idl |
| diff --git a/chrome/common/extensions/api/socket.idl b/chrome/common/extensions/api/socket.idl |
| index 4bc60680e971f66962846c70791350475f193b8d..ae1922975d547924c418fbe52ad159e2989c9101 100644 |
| --- a/chrome/common/extensions/api/socket.idl |
| +++ b/chrome/common/extensions/api/socket.idl |
| @@ -124,6 +124,8 @@ namespace socket { |
| callback GetJoinedGroupsCallback = void (DOMString[] groups); |
| + callback AllowAddressReuseCallback = void (long result); |
| + |
| interface Functions { |
| // Creates a socket of the specified type that will connect to the specified |
| // remote machine. |
| @@ -267,18 +269,18 @@ namespace socket { |
| // before calling this method. |
| // |socketId| : The socketId. |
| // |address| : The group address to join. Domain names are not supported. |
| - // |callback| : Called when the join group operation is done with an |
| + // |callback| : Called when the join group operation is done with an |
| // integer parameter indicating the platform-independent error code. |
| static void joinGroup(long socketId, |
| DOMString address, |
| JoinGroupCallback callback); |
| // Leave the multicast group previously joined using <code>joinGroup</code>. |
| - // It's not necessary to leave the multicast group before destroying the |
| + // It's not necessary to leave the multicast group before destroying the |
| // socket or exiting. This is automatically called by the OS. |
| // |
| - // Leaving the group will prevent the router from sending multicast |
| - // datagrams to the local host, presuming no other process on the host is |
| + // Leaving the group will prevent the router from sending multicast |
| + // datagrams to the local host, presuming no other process on the host is |
| // still joined to the group. |
| // |
| // |socketId| : The socketId. |
| @@ -300,7 +302,7 @@ namespace socket { |
| long ttl, |
| SetMulticastTimeToLiveCallback callback); |
| - // Set whether multicast packets sent from the host to the multicast |
| + // Set whether multicast packets sent from the host to the multicast |
| // group will be looped back to the host. |
| // |
| // Note: the behavior of <code>setMulticastLoopbackMode</code> is slightly |
| @@ -327,6 +329,13 @@ namespace socket { |
| // |callback| : Called with an array of strings of the result. |
| static void getJoinedGroups(long socketId, |
| GetJoinedGroupsCallback callback); |
| + |
| + // Allow a UDP socket to bind to an already-bound address. Note that binding |
|
miket_OOO
2013/05/24 20:53:48
I know you were just following convention, but we
Noam Samuel
2013/05/24 21:43:53
Done.
|
| + // two sockets to the same address leads to undefined behavior for packets |
| + // not sent to a broadcast or multicast address. |
| + // |callback| : Called when the operation is done. |
| + static void allowAddressReuse(long socketId, |
| + AllowAddressReuseCallback callback); |
| }; |
| }; |