| 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..ea27e90ff3c9d81fc226f4aabeeee253a6ca37d2 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.
|
| @@ -262,23 +264,24 @@ namespace socket {
|
| // |callback| : Called when local adapter information is available.
|
| static void getNetworkList(GetNetworkCallback callback);
|
|
|
| - // Join the multicast group and start to receive packets from that group.
|
| + // Joins the multicast group and start to receive packets from that group.
|
| // The socket must be of UDP type and must be bound to a local port
|
| // 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
|
| - // socket or exiting. This is automatically called by the OS.
|
| + // Leaves the multicast group previously joined using
|
| + // <code>joinGroup</code>. 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.
|
| @@ -288,7 +291,7 @@ namespace socket {
|
| static void leaveGroup(long socketId, DOMString address,
|
| LeaveGroupCallback callback);
|
|
|
| - // Set the time-to-live of multicast packets sent to the multicast group.
|
| + // Sets the time-to-live of multicast packets sent to the multicast group.
|
| //
|
| // Calling this method does not require multicast permissions.
|
| //
|
| @@ -300,7 +303,7 @@ namespace socket {
|
| long ttl,
|
| SetMulticastTimeToLiveCallback callback);
|
|
|
| - // Set whether multicast packets sent from the host to the multicast
|
| + // Sets 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
|
| @@ -322,11 +325,18 @@ namespace socket {
|
| boolean enabled,
|
| SetMulticastLoopbackModeCallback callback);
|
|
|
| - // Get the multicast group addresses the socket is currently joined to.
|
| + // Gets the multicast group addresses the socket is currently joined to.
|
| // |socketId| : The socketId.
|
| // |callback| : Called with an array of strings of the result.
|
| static void getJoinedGroups(long socketId,
|
| GetJoinedGroupsCallback callback);
|
| +
|
| + // Allows a UDP socket to bind to an already-bound address. Note that
|
| + // binding 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);
|
| };
|
|
|
| };
|
|
|