Documentation for the Unreal C++ Library
|
#include <PVROBeacon.h>
Public Member Functions | |
FPVROBeacon () | |
virtual | ~FPVROBeacon () |
bool | BroadcastPacket (uint8 *Packet, int32 Length) |
bool | BroadcastPacketFromSocket (uint8 *Packet, int32 Length) |
DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnPortChanged, int32) | |
bool | Init (int32 Port) |
bool | InitClient (int32 IP, int32 Port, int32 ListenPort) |
bool | InitHost (int32 Port) |
bool | IsListenSocketValid () const |
int32 | ReceivePacket (uint8 *PacketData, int32 BufferSize) |
Private Attributes | |
TSharedPtr< class FInternetAddr > | BroadcastAddr |
TSharedPtr< class FInternetAddr > | ListenAddr |
class FSocket * | ListenSocket |
TSharedRef< class FInternetAddr > | SockAddr |
Class responsible for sending/receiving UDP broadcasts for LAN match discovery
Definition at line 38 of file PVROBeacon.h.
FPVROBeacon::FPVROBeacon | ( | void | ) |
Sets the broadcast address for this object
Definition at line 16 of file PVROBeacon.cpp.
|
virtual |
Frees the broadcast socket
Definition at line 23 of file PVROBeacon.cpp.
bool FPVROBeacon::BroadcastPacket | ( | uint8 * | Packet, |
int32 | Length ) |
Uses the cached broadcast address to send packet to a subnet
Packet | the packet to send |
Length | the size of the packet to send |
Definition at line 195 of file PVROBeacon.cpp.
bool FPVROBeacon::BroadcastPacketFromSocket | ( | uint8 * | Packet, |
int32 | Length ) |
Uses the cached socket address to send packet to a subnet
Packet | the packet to send |
Length | the size of the packet to send |
Definition at line 202 of file PVROBeacon.cpp.
FPVROBeacon::DEFINE_ONLINE_DELEGATE_ONE_PARAM | ( | OnPortChanged | , |
int32 | ) |
bool FPVROBeacon::Init | ( | int32 | Port | ) |
Initializes the socket
Port | the port to listen on |
Definition at line 35 of file PVROBeacon.cpp.
bool FPVROBeacon::InitClient | ( | int32 | IP, |
int32 | Port, | ||
int32 | ListenPort ) |
Initializes the socket for the client in online connection
IP | the address to connect to |
Port | the port to connect to |
ListenPort | the port to listen on |
Definition at line 121 of file PVROBeacon.cpp.
bool FPVROBeacon::InitHost | ( | int32 | Port | ) |
Initializes the socket for host in online connection
Port | the port to listen on |
Definition at line 76 of file PVROBeacon.cpp.
bool FPVROBeacon::IsListenSocketValid | ( | ) | const |
Return true if there is a valid ListenSocket
Definition at line 30 of file PVROBeacon.cpp.
int32 FPVROBeacon::ReceivePacket | ( | uint8 * | PacketData, |
int32 | BufferSize ) |
Called to poll the socket for pending data. Any data received is placed in the specified packet buffer
PacketData | the buffer to get the socket's packet data |
BufferSize | the size of the packet buffer |
Definition at line 177 of file PVROBeacon.cpp.
|
private |
Builds the broadcast address and caches it
Definition at line 41 of file PVROBeacon.h.
|
private |
The address in bound requests come in on
Definition at line 45 of file PVROBeacon.h.
|
private |
The socket to listen for requests on
Definition at line 43 of file PVROBeacon.h.
|
private |
Temporary address when receiving packets
Definition at line 47 of file PVROBeacon.h.