| Index: ppapi/proxy/tcp_socket_resource.h
|
| diff --git a/ppapi/proxy/tcp_socket_resource.h b/ppapi/proxy/tcp_socket_resource.h
|
| index 05b4fe385be0024016e89f39e557adfd23a6cc1c..6b89a0e44616fce9dba3371a97dbd898ff069fdd 100644
|
| --- a/ppapi/proxy/tcp_socket_resource.h
|
| +++ b/ppapi/proxy/tcp_socket_resource.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| +#include "ppapi/c/ppb_net_address.h"
|
| #include "ppapi/proxy/tcp_socket_resource_base.h"
|
| #include "ppapi/thunk/ppb_tcp_socket_api.h"
|
|
|
| @@ -16,13 +17,20 @@ namespace proxy {
|
| class PPAPI_PROXY_EXPORT TCPSocketResource : public thunk::PPB_TCPSocket_API,
|
| public TCPSocketResourceBase {
|
| public:
|
| + // C-tor used for new sockets created.
|
| TCPSocketResource(Connection connection, PP_Instance instance);
|
| + TCPSocketResource(Connection connection,
|
| + PP_Instance instance,
|
| + PP_NetAddress_Family family);
|
| +
|
| virtual ~TCPSocketResource();
|
|
|
| // PluginResource overrides.
|
| virtual thunk::PPB_TCPSocket_API* AsPPB_TCPSocket_API() OVERRIDE;
|
|
|
| // thunk::PPB_TCPSocket_API implementation.
|
| + virtual int32_t Bind(PP_Resource addr,
|
| + scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
| virtual int32_t Connect(PP_Resource addr,
|
| scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
| virtual PP_Resource GetLocalAddress() OVERRIDE;
|
| @@ -33,12 +41,29 @@ class PPAPI_PROXY_EXPORT TCPSocketResource : public thunk::PPB_TCPSocket_API,
|
| virtual int32_t Write(const char* buffer,
|
| int32_t bytes_to_write,
|
| scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
| + virtual int32_t Listen(int32_t backlog,
|
| + scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
| + virtual int32_t Accept(PP_Resource* accepted_tcp_socket,
|
| + scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
| virtual void Close() OVERRIDE;
|
| virtual int32_t SetOption(PP_TCPSocket_Option name,
|
| const PP_Var& value,
|
| scoped_refptr<TrackedCallback> callback) OVERRIDE;
|
|
|
| + // TCPSocketResourceBase implementation.
|
| + virtual PP_Resource CreateAcceptedSocket(
|
| + int pending_host_id,
|
| + const PP_NetAddress_Private& local_addr,
|
| + const PP_NetAddress_Private& remote_addr) OVERRIDE;
|
| +
|
| private:
|
| + // C-tor used for accepted sockets.
|
| + TCPSocketResource(Connection connection,
|
| + PP_Instance instance,
|
| + int pending_host_id,
|
| + const PP_NetAddress_Private& local_addr,
|
| + const PP_NetAddress_Private& remote_addr);
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TCPSocketResource);
|
| };
|
|
|
|
|