DescriptionPepper: 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
Committed: https://crrev.com/c76a0f987cf778d0cb14da86f132af9a0b200f72
Cr-Commit-Position: refs/heads/master@{#311563}
Patch Set 1 #Patch Set 2 : Test multiple send, queue sends when socket_ is busy. #Patch Set 3 : pop() pending sends after they're sent. #Patch Set 4 : Add a separate test for parallel SendTo. #
Total comments: 18
Patch Set 5 : Review comments, document INPROGRESS error in IDL. #
Total comments: 8
Patch Set 6 : Streamline handling of pending sends. #
Total comments: 4
Patch Set 7 : Explicit loop to flush, don't flush if already waiting. #Patch Set 8 : Eliminate recursion. #Patch Set 9 : Rebase. #Patch Set 10 : Fix rebase weirdness. #
Messages
Total messages: 20 (2 generated)
|