Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: ppapi/cpp/udp_socket.h

Issue 632113003: Pepper: Allow plugins to call PPB_UDP_Socket::SendTo multiple times. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase weirdness. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ppapi/c/ppb_udp_socket.h ('k') | ppapi/proxy/udp_socket_resource_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_CPP_UDP_SOCKET_H_ 5 #ifndef PPAPI_CPP_UDP_SOCKET_H_
6 #define PPAPI_CPP_UDP_SOCKET_H_ 6 #define PPAPI_CPP_UDP_SOCKET_H_
7 7
8 #include "ppapi/c/ppb_udp_socket.h" 8 #include "ppapi/c/ppb_udp_socket.h"
9 #include "ppapi/cpp/net_address.h" 9 #include "ppapi/cpp/net_address.h"
10 #include "ppapi/cpp/pass_ref.h" 10 #include "ppapi/cpp/pass_ref.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 /// @param[in] num_bytes The number of bytes to send. 118 /// @param[in] num_bytes The number of bytes to send.
119 /// @param[in] addr A <code>NetAddress</code> object holding the destination 119 /// @param[in] addr A <code>NetAddress</code> object holding the destination
120 /// address. 120 /// address.
121 /// @param[in] callback A <code>CompletionCallback</code> to be called upon 121 /// @param[in] callback A <code>CompletionCallback</code> to be called upon
122 /// completion. 122 /// completion.
123 /// 123 ///
124 /// @return A non-negative number on success to indicate how many bytes have 124 /// @return A non-negative number on success to indicate how many bytes have
125 /// been sent; otherwise, an error code from <code>pp_errors.h</code>. 125 /// been sent; otherwise, an error code from <code>pp_errors.h</code>.
126 /// <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have 126 /// <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have
127 /// required permissions. 127 /// required permissions.
128 /// <code>PP_ERROR_INPROGRESS</code> will be returned if the socket is busy
129 /// sending. The caller should wait until a pending send completes before
130 /// retrying.
128 int32_t SendTo(const char* buffer, 131 int32_t SendTo(const char* buffer,
129 int32_t num_bytes, 132 int32_t num_bytes,
130 const NetAddress& addr, 133 const NetAddress& addr,
131 const CompletionCallback& callback); 134 const CompletionCallback& callback);
132 135
133 /// Cancels all pending reads and writes, and closes the socket. Any pending 136 /// Cancels all pending reads and writes, and closes the socket. Any pending
134 /// callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if 137 /// callbacks will still run, reporting <code>PP_ERROR_ABORTED</code> if
135 /// pending IO was interrupted. After a call to this method, no output 138 /// pending IO was interrupted. After a call to this method, no output
136 /// paramters passed into previous <code>RecvFrom()</code> calls will be 139 /// paramters passed into previous <code>RecvFrom()</code> calls will be
137 /// accessed. It is not valid to call <code>Bind()</code> again. 140 /// accessed. It is not valid to call <code>Bind()</code> again.
(...skipping 13 matching lines...) Expand all
151 /// 154 ///
152 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 155 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
153 int32_t SetOption(PP_UDPSocket_Option name, 156 int32_t SetOption(PP_UDPSocket_Option name,
154 const Var& value, 157 const Var& value,
155 const CompletionCallback& callback); 158 const CompletionCallback& callback);
156 }; 159 };
157 160
158 } // namespace pp 161 } // namespace pp
159 162
160 #endif // PPAPI_CPP_UDP_SOCKET_H_ 163 #endif // PPAPI_CPP_UDP_SOCKET_H_
OLDNEW
« no previous file with comments | « ppapi/c/ppb_udp_socket.h ('k') | ppapi/proxy/udp_socket_resource_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698