summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authorbbudge <bbudge@chromium.org>2015-01-14 14:42:01 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-14 22:42:45 +0000
commitc76a0f987cf778d0cb14da86f132af9a0b200f72 (patch)
tree482fbcc5cdc268b7643f743bd909bab2cc63bc7c /ppapi/api
parente6ed553d2cc9c34a1e5de42a803a92ad542ca3c9 (diff)
downloadchromium_src-c76a0f987cf778d0cb14da86f132af9a0b200f72.zip
chromium_src-c76a0f987cf778d0cb14da86f132af9a0b200f72.tar.gz
chromium_src-c76a0f987cf778d0cb14da86f132af9a0b200f72.tar.bz2
Pepper: Allow plugins to call PPB_UDP_Socket::SendTo multiple times.
This changes the implementation to allow multiple SendTo calls to be in flight at the same time. The plugin can now call SendTo multiple times before getting PP_ERROR_INPROGRESS. The number of calls is an implementation detail. Plugins that want maximum performance should call SendTo continuously until they get an in progress result, then wait for one or more previous calls to complete before calling Send again. The resource is changed to queue SendTo callbacks. It checks that the plugin stays within the limit, which is currently 8. The browser message filter is changed to call SendTo until the socket is busy, then queue the sends. It checks that the plugin can't grow the queue past the limit. In theory, a plugin could go over the limit by bypassing the resource checks but not saturating the socket. This is not really a problem. Adds a test to send multiple messages in the "optional callbacks" case. BUG=154338 Review URL: https://codereview.chromium.org/632113003 Cr-Commit-Position: refs/heads/master@{#311563}
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/ppb_udp_socket.idl3
1 files changed, 3 insertions, 0 deletions
diff --git a/ppapi/api/ppb_udp_socket.idl b/ppapi/api/ppb_udp_socket.idl
index 8226c00..9f186f5 100644
--- a/ppapi/api/ppb_udp_socket.idl
+++ b/ppapi/api/ppb_udp_socket.idl
@@ -157,6 +157,9 @@ interface PPB_UDPSocket {
* been sent; otherwise, an error code from <code>pp_errors.h</code>.
* <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have
* required permissions.
+ * <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy
+ * sending. The caller should wait until a pending send completes before
+ * retrying.
*/
int32_t SendTo([in] PP_Resource udp_socket,
[in] str_t buffer,