| Index: ppapi/proxy/udp_socket_resource.cc
|
| diff --git a/ppapi/proxy/udp_socket_resource.cc b/ppapi/proxy/udp_socket_resource.cc
|
| index d815b9fa62f5b77d2765ea85a07f2b793f386ba6..25a0f880c28bfba4b5d84b7fcea60241696cb107 100644
|
| --- a/ppapi/proxy/udp_socket_resource.cc
|
| +++ b/ppapi/proxy/udp_socket_resource.cc
|
| @@ -79,11 +79,26 @@ int32_t UDPSocketResource::SetOption1_0(
|
| PP_UDPSocket_Option name,
|
| const PP_Var& value,
|
| scoped_refptr<TrackedCallback> callback) {
|
| + if (name > PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE)
|
| + return PP_ERROR_BADARGUMENT;
|
| +
|
| return SetOptionImpl(name, value,
|
| true, // Check bind() state.
|
| callback);
|
| }
|
|
|
| +int32_t UDPSocketResource::SetOption1_1(
|
| + PP_UDPSocket_Option name,
|
| + const PP_Var& value,
|
| + scoped_refptr<TrackedCallback> callback) {
|
| + if (name > PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE)
|
| + return PP_ERROR_BADARGUMENT;
|
| +
|
| + return SetOptionImpl(name, value,
|
| + false, // Check bind() state.
|
| + callback);
|
| +}
|
| +
|
| int32_t UDPSocketResource::SetOption(
|
| PP_UDPSocket_Option name,
|
| const PP_Var& value,
|
| @@ -93,5 +108,27 @@ int32_t UDPSocketResource::SetOption(
|
| callback);
|
| }
|
|
|
| +int32_t UDPSocketResource::JoinGroup(
|
| + PP_Resource group,
|
| + scoped_refptr<TrackedCallback> callback) {
|
| + EnterNetAddressNoLock enter(group, true);
|
| + if (enter.failed())
|
| + return PP_ERROR_BADRESOURCE;
|
| +
|
| + return JoinGroupImpl(&enter.object()->GetNetAddressPrivate(),
|
| + callback);
|
| +}
|
| +
|
| +int32_t UDPSocketResource::LeaveGroup(
|
| + PP_Resource group,
|
| + scoped_refptr<TrackedCallback> callback) {
|
| + EnterNetAddressNoLock enter(group, true);
|
| + if (enter.failed())
|
| + return PP_ERROR_BADRESOURCE;
|
| +
|
| + return LeaveGroupImpl(&enter.object()->GetNetAddressPrivate(),
|
| + callback);
|
| +}
|
| +
|
| } // namespace proxy
|
| } // namespace ppapi
|
|
|