5 #ifndef PPAPI_CPP_TCP_SOCKET_H_
6 #define PPAPI_CPP_TCP_SOCKET_H_
10 #include "ppapi/c/ppb_tcp_socket.h"
11 #include "ppapi/cpp/net_address.h"
17 class CompletionCallback;
20 template <
typename T>
class CompletionCallbackWithOutput;
142 int32_t
Read(
char* buffer,
143 int32_t bytes_to_read,
156 int32_t
Write(
const char* buffer,
157 int32_t bytes_to_write,
173 int32_t
Listen(int32_t backlog,
207 int32_t
SetOption(PP_TCPSocket_Option name,
214 #endif // PPAPI_CPP_TCP_SOCKET_H_
int32_t Listen(int32_t backlog, const CompletionCallback &callback)
int32_t SetOption(PP_TCPSocket_Option name, const Var &value, const CompletionCallback &callback)
Definition: tcp_socket.h:29
NetAddress GetLocalAddress() const
Definition: completion_callback.h:189
int32_t Bind(const NetAddress &addr, const CompletionCallback &callback)
virtual ~TCPSocket()
The destructor.
int32_t Accept(const CompletionCallbackWithOutput< TCPSocket > &callback)
int32_t Read(char *buffer, int32_t bytes_to_read, const CompletionCallback &callback)
int32_t Connect(const NetAddress &addr, const CompletionCallback &callback)
The NetAddress class represents a network address.
Definition: net_address.h:18
Definition: completion_callback.h:26
TCPSocket & operator=(const TCPSocket &other)
Definition: instance_handle.h:44
PassRef
Definition: pass_ref.h:17
int32_t Write(const char *buffer, int32_t bytes_to_write, const CompletionCallback &callback)
NetAddress GetRemoteAddress() const
A generic type used for passing data types between the module and the page.
Definition: var.h:23
A reference counted module resource.
Definition: resource.h:20
static bool IsAvailable()