Pepper_42_C++_interfaces
Public Member Functions | List of all members
pp::UDPSocketExtensionSamsung Class Reference

#include <udp_socket_extension_samsung.h>

Inheritance diagram for pp::UDPSocketExtensionSamsung:
Inheritance graph
Collaboration diagram for pp::UDPSocketExtensionSamsung:
Collaboration graph

Public Member Functions

 UDPSocketExtensionSamsung ()
 Constructs an is_null() gesture input event object. More...
 
 UDPSocketExtensionSamsung (const InstanceHandle &instance)
 
int32_t GetOption (PP_UDPSocket_Option name, const CompletionCallbackWithOutput< Var > &callback)
 
int32_t JoinMulticast (const struct PP_MulticastMembership &membership, const CompletionCallback &callback)
 
int32_t LeaveMulticast (const struct PP_MulticastMembership &membership, const CompletionCallback &callback)
 
- Public Member Functions inherited from pp::UDPSocket
 UDPSocket ()
 
 UDPSocket (const InstanceHandle &instance)
 
 UDPSocket (PassRef, PP_Resource resource)
 
 UDPSocket (const UDPSocket &other)
 
virtual ~UDPSocket ()
 The destructor. More...
 
UDPSocketoperator= (const UDPSocket &other)
 
int32_t Bind (const NetAddress &addr, const CompletionCallback &callback)
 
NetAddress GetBoundAddress ()
 
int32_t RecvFrom (char *buffer, int32_t num_bytes, const CompletionCallbackWithOutput< NetAddress > &callback)
 
int32_t SendTo (const char *buffer, int32_t num_bytes, const NetAddress &addr, const CompletionCallback &callback)
 
void Close ()
 
int32_t SetOption (PP_UDPSocket_Option name, const Var &value, const CompletionCallback &callback)
 
- Public Member Functions inherited from pp::Resource
 Resource ()
 The default constructor. More...
 
 Resource (const Resource &other)
 
virtual ~Resource ()
 Destructor. More...
 
Resourceoperator= (const Resource &other)
 
bool is_null () const
 
PP_Resource pp_resource () const
 
PP_Resource detach ()
 

Additional Inherited Members

- Static Public Member Functions inherited from pp::UDPSocket
static bool IsAvailable ()
 
- Protected Member Functions inherited from pp::Resource
 Resource (PP_Resource resource)
 
 Resource (PassRef, PP_Resource resource)
 
void PassRefFromConstructor (PP_Resource resource)
 
void Clear ()
 Sets this resource to null. This releases ownership of the resource. More...
 

Detailed Description

Definition at line 24 of file udp_socket_extension_samsung.h.

Constructor & Destructor Documentation

pp::UDPSocketExtensionSamsung::UDPSocketExtensionSamsung ( )

Constructs an is_null() gesture input event object.

pp::UDPSocketExtensionSamsung::UDPSocketExtensionSamsung ( const InstanceHandle instance)
explicit

This constructor constructs a extended socket object from the provided generic UDP socket. If the given socket is itself is_null() or is not a UDPSocket, the extended socket object will be is_null().

Parameters
[in]socketA generic UDP socket instance.

Member Function Documentation

int32_t pp::UDPSocketExtensionSamsung::GetOption ( PP_UDPSocket_Option  name,
const CompletionCallbackWithOutput< Var > &  callback 
)

Get a socket option on the associated socket. Please see the PP_UDPSocket_Option description for option names, value types and allowed values. Socket need to be already bound and method will fail with PP_ERROR_FAILED if it's not.

Parameters
[in]udp_socketA PP_Resource corresponding to a UDP socket.
[in]nameThe option to get.
[out]Valueof requested option.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
An int32_t containing an error code from pp_errors.h
int32_t pp::UDPSocketExtensionSamsung::JoinMulticast ( const struct PP_MulticastMembership &  membership,
const CompletionCallback callback 
)

Join a multicast group. Use optional source_addr to allow receiving data only from a specified source. This option can be used multiple times to allow receiving data from more than one source. Socket need to be already bound and method will fail with PP_ERROR_FAILED if it's not.

Parameters
[in]udp_socketA PP_Resource corresponding to a UDP socket.
[in]membershipA PP_MulticastMembership multicast group and optional source IP.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
An int32_t containing an error code from pp_errors.h
int32_t pp::UDPSocketExtensionSamsung::LeaveMulticast ( const struct PP_MulticastMembership &  membership,
const CompletionCallback callback 
)

Leave a multicast group. Use optional member source_addr to stop receiving data from multicast group that come from a given source. If the application has subscribed to multiple sources within the same group, data from the remaining sources will still be delivered. Socket need to be already bound and method will fail with PP_ERROR_FAILED if it's not.

Parameters
[in]udp_socketA PP_Resource corresponding to a UDP socket.
[in]membershipA PP_MulticastMembership multicast group and optional source IP.
[in]callbackA PP_CompletionCallback to be called upon completion.
Returns
An int32_t containing an error code from pp_errors.h

The documentation for this class was generated from the following file: