5 #ifndef PPAPI_CPP_UDP_SOCKET_H_
6 #define PPAPI_CPP_UDP_SOCKET_H_
10 #include "ppapi/c/ppb_udp_socket.h"
11 #include "ppapi/cpp/net_address.h"
17 class CompletionCallback;
21 template <
typename T>
class CompletionCallbackWithOutput;
133 int32_t
SendTo(
const char* buffer,
158 int32_t
SetOption(PP_UDPSocket_Option name,
189 #endif // PPAPI_CPP_UDP_SOCKET_H_
int32_t SetOption(PP_UDPSocket_Option name, const Var &value, const CompletionCallback &callback)
int32_t LeaveGroup(const NetAddress &group, const CompletionCallback callback)
Definition: completion_callback.h:189
int32_t JoinGroup(const NetAddress &group, const CompletionCallback callback)
NetAddress GetBoundAddress()
The NetAddress class represents a network address.
Definition: net_address.h:18
Definition: completion_callback.h:26
int32_t SendTo(const char *buffer, int32_t num_bytes, const NetAddress &addr, const CompletionCallback &callback)
virtual ~UDPSocket()
The destructor.
Definition: instance_handle.h:44
PassRef
Definition: pass_ref.h:17
int32_t RecvFrom(char *buffer, int32_t num_bytes, const CompletionCallbackWithOutput< NetAddress > &callback)
Definition: udp_socket.h:30
A generic type used for passing data types between the module and the page.
Definition: var.h:23
static bool IsAvailable()
int32_t Bind(const NetAddress &addr, const CompletionCallback &callback)
A reference counted module resource.
Definition: resource.h:20
UDPSocket & operator=(const UDPSocket &other)