diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 19:22:46 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 19:22:46 +0000 |
commit | 5c2f03992190825a78ae186a4b35a7f0c8c60fa3 (patch) | |
tree | f1396322be3ec0e8ff529f0a00834d53cb9f1dc8 /ppapi/c | |
parent | 2fb5d4050421a656585c7623cbd0c9c4d113f17b (diff) | |
download | chromium_src-5c2f03992190825a78ae186a4b35a7f0c8c60fa3.zip chromium_src-5c2f03992190825a78ae186a4b35a7f0c8c60fa3.tar.gz chromium_src-5c2f03992190825a78ae186a4b35a7f0c8c60fa3.tar.bz2 |
PPB_TCPSocket: Remove support for PP_TCPSOCKET_OPTION_ADDRESS_REUSE.
It seems SO_REUSEADDR has security issues on Windows, so we don't want to expose
it via PP_TCPSOCKET_OPTION_ADDRESS_REUSE.
After this change, PPB_TCPSocket will use the same default settings as
net::TCPServerSocket when Bind() is called:
- On POSIX: set SO_REUSEADDR to true.
- On Windows: set SO_EXCLUSIVEADDRUSE to true.
BUG=262601
TEST=None
R=dmichael@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/24324003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r-- | ppapi/c/ppb_tcp_socket.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/ppapi/c/ppb_tcp_socket.h b/ppapi/c/ppb_tcp_socket.h index 9a9b964..a6fe111 100644 --- a/ppapi/c/ppb_tcp_socket.h +++ b/ppapi/c/ppb_tcp_socket.h @@ -3,7 +3,7 @@ * found in the LICENSE file. */ -/* From ppb_tcp_socket.idl modified Thu Sep 19 14:01:43 2013. */ +/* From ppb_tcp_socket.idl modified Fri Sep 20 09:58:19 2013. */ #ifndef PPAPI_C_PPB_TCP_SOCKET_H_ #define PPAPI_C_PPB_TCP_SOCKET_H_ @@ -59,14 +59,7 @@ typedef enum { * size. Even if <code>SetOption()</code> succeeds, the browser doesn't * guarantee it will conform to the size. */ - PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2, - /** - * Allows the socket to share the local address to which it will be bound. - * Value's type should be <code>PP_VARTYPE_BOOL</code>. - * This option can only be set before calling <code>Bind()</code>. - * Supported since version 1.1. - */ - PP_TCPSOCKET_OPTION_ADDRESS_REUSE = 3 + PP_TCPSOCKET_OPTION_RECV_BUFFER_SIZE = 2 } PP_TCPSocket_Option; PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TCPSocket_Option, 4); /** @@ -145,10 +138,10 @@ struct PPB_TCPSocket_1_1 { * - <code>PP_ERROR_CONNECTION_TIMEDOUT</code>: the connection attempt timed * out. * - * If the socket is listening/connected or has a pending listen/connect - * request, <code>Connect()</code> will fail without starting a connection - * attempt. Otherwise, any failure during the connection attempt will cause - * the socket to be closed. + * Since version 1.1, if the socket is listening/connected or has a pending + * listen/connect request, <code>Connect()</code> will fail without starting a + * connection attempt; otherwise, any failure during the connection attempt + * will cause the socket to be closed. */ int32_t (*Connect)(PP_Resource tcp_socket, PP_Resource addr, |