Documentation for the Unreal C++ Library
Loading...
Searching...
No Matches
FPVROSession Class Reference

#include <PVROBeacon.h>

Public Member Functions

 FPVROSession ()
 
virtual ~FPVROSession ()
 
bool BroadcastPacket (uint8 *Packet, int32 Length)
 
bool BroadcastPacketFromSocket (uint8 *Packet, int32 Length)
 
void CreateClientQueryPacket (FNboSerializeToBuffer &Packet, uint64 ClientNonce)
 
void CreateHostResponsePacket (FNboSerializeToBuffer &Packet, uint64 ClientNonce)
 
 DEFINE_ONLINE_DELEGATE (OnSearchingTimeout)
 
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnValidQueryPacket, uint8 *, int32, uint64)
 
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnValidResponsePacket, uint8 *, int32)
 
ELanBeaconState::Type GetBeaconState () const
 
bool Host (FOnValidQueryPacketDelegate &QueryDelegate, int32 Port=-1)
 
bool Search (class FNboSerializeToBuffer &Packet, FOnValidResponsePacketDelegate &ResponseDelegate, FOnSearchingTimeoutDelegate &TimeoutDelegate)
 
void StopLANSession ()
 
void Tick (float DeltaTime)
 

Public Attributes

int32 ClientSessionPort
 
int32 HostSessionAddress
 
int32 HostSessionPort
 
bool IsLANMatch
 
int32 LanAnnouncePort
 
class FPVROBeaconLanBeacon
 
ELanBeaconState::Type LanBeaconState
 
int32 LanGameUniqueId
 
uint64 LanNonce
 
int32 LanPacketPlatformMask
 
float LanQueryTimeLeft
 
float LanQueryTimeout
 

Protected Member Functions

bool IsValidLanQueryPacket (const uint8 *Packet, uint32 Length, uint64 &ClientNonce)
 
bool IsValidLanResponsePacket (const uint8 *Packet, uint32 Length)
 

Detailed Description

Encapsulate functionality related to LAN and Internet broadcast data

Definition at line 126 of file PVROBeacon.h.

Constructor & Destructor Documentation

◆ FPVROSession()

FPVROSession::FPVROSession ( )
inline

Definition at line 184 of file PVROBeacon.h.

◆ ~FPVROSession()

virtual FPVROSession::~FPVROSession ( )
inlinevirtual

Definition at line 204 of file PVROBeacon.h.

Member Function Documentation

◆ BroadcastPacket()

bool FPVROSession::BroadcastPacket ( uint8 * Packet,
int32 Length )

Uses the cached broadcast address to send packet to a subnet

Parameters
Packetthe packet to send
Lengththe size of the packet to send

Definition at line 418 of file PVROBeacon.cpp.

Here is the call graph for this function:

◆ BroadcastPacketFromSocket()

bool FPVROSession::BroadcastPacketFromSocket ( uint8 * Packet,
int32 Length )

Uses the cached broadcast address to send packet to a subnet

Parameters
Packetthe packet to send
Lengththe size of the packet to send

Definition at line 433 of file PVROBeacon.cpp.

Here is the call graph for this function:

◆ CreateClientQueryPacket()

void FPVROSession::CreateClientQueryPacket ( FNboSerializeToBuffer & Packet,
uint64 ClientNonce )

Definition at line 404 of file PVROBeacon.cpp.

◆ CreateHostResponsePacket()

void FPVROSession::CreateHostResponsePacket ( FNboSerializeToBuffer & Packet,
uint64 ClientNonce )

create packet of MAX size

Definition at line 390 of file PVROBeacon.cpp.

◆ DEFINE_ONLINE_DELEGATE()

FPVROSession::DEFINE_ONLINE_DELEGATE ( OnSearchingTimeout )

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM()

FPVROSession::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnValidQueryPacket ,
uint8 * ,
int32 ,
uint64  )

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM()

FPVROSession::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnValidResponsePacket ,
uint8 * ,
int32  )

◆ GetBeaconState()

ELanBeaconState::Type FPVROSession::GetBeaconState ( ) const
inline

Definition at line 255 of file PVROBeacon.h.

Here is the caller graph for this function:

◆ Host()

bool FPVROSession::Host ( FOnValidQueryPacketDelegate & QueryDelegate,
int32 Port = -1 )

Creates the LAN beacon for queries/advertising servers

Parameters
QueryDelegatedelegate to fire when a client query is received
Portif -1, use LanAnnouncePort, otherwise use this port

Definition at line 209 of file PVROBeacon.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsValidLanQueryPacket()

bool FPVROSession::IsValidLanQueryPacket ( const uint8 * Packet,
uint32 Length,
uint64 & ClientNonce )
protected

Determines if the packet header is valid or not

Parameters
Packetthe packet data to check
Lengththe size of the packet buffer
ClientNoncethe nonce to check against
Returns
true if the header is valid, false otherwise

Definition at line 448 of file PVROBeacon.cpp.

Here is the caller graph for this function:

◆ IsValidLanResponsePacket()

bool FPVROSession::IsValidLanResponsePacket ( const uint8 * Packet,
uint32 Length )
protected

Determines if the packet header is valid or not

Parameters
Packetthe packet data to check
Lengththe size of the packet buffer
Returns
true if the header is valid, false otherwise

Definition at line 486 of file PVROBeacon.cpp.

Here is the caller graph for this function:

◆ Search()

bool FPVROSession::Search ( class FNboSerializeToBuffer & Packet,
FOnValidResponsePacketDelegate & ResponseDelegate,
FOnSearchingTimeoutDelegate & TimeoutDelegate )

Creates the LAN beacon for queries/advertising servers

Parameters
Packetpacket to be search when broadcasting the search
ResponseDelegatedelegate to fire when a server response is received
TimeoutDelegatedelegate to fire if we exceed maximum search time
Returns
true if search was started successfully, false otherwise

Definition at line 256 of file PVROBeacon.cpp.

Here is the call graph for this function:

◆ StopLANSession()

void FPVROSession::StopLANSession ( )

Stops the LAN beacon from accepting broadcasts

Definition at line 319 of file PVROBeacon.cpp.

Here is the caller graph for this function:

◆ Tick()

void FPVROSession::Tick ( float DeltaTime)

Definition at line 337 of file PVROBeacon.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ClientSessionPort

int32 FPVROSession::ClientSessionPort

Definition at line 159 of file PVROBeacon.h.

◆ HostSessionAddress

int32 FPVROSession::HostSessionAddress

Definition at line 155 of file PVROBeacon.h.

◆ HostSessionPort

int32 FPVROSession::HostSessionPort

Definition at line 157 of file PVROBeacon.h.

◆ IsLANMatch

bool FPVROSession::IsLANMatch

Definition at line 161 of file PVROBeacon.h.

◆ LanAnnouncePort

int32 FPVROSession::LanAnnouncePort

Port to listen on for LAN queries/responses

Definition at line 153 of file PVROBeacon.h.

◆ LanBeacon

class FPVROBeacon* FPVROSession::LanBeacon

LAN beacon for packet broadcast

Definition at line 173 of file PVROBeacon.h.

◆ LanBeaconState

ELanBeaconState::Type FPVROSession::LanBeaconState

State of the LAN beacon

Definition at line 176 of file PVROBeacon.h.

◆ LanGameUniqueId

int32 FPVROSession::LanGameUniqueId

Unique id to keep UE3 games from seeing each others' LAN packets

Definition at line 164 of file PVROBeacon.h.

◆ LanNonce

uint64 FPVROSession::LanNonce

Used by a client to uniquely identify itself during LAN match discovery

Definition at line 179 of file PVROBeacon.h.

◆ LanPacketPlatformMask

int32 FPVROSession::LanPacketPlatformMask

Mask containing which platforms can cross communicate

Definition at line 167 of file PVROBeacon.h.

◆ LanQueryTimeLeft

float FPVROSession::LanQueryTimeLeft

The amount of time before the LAN query is considered done

Definition at line 182 of file PVROBeacon.h.

◆ LanQueryTimeout

float FPVROSession::LanQueryTimeout

The amount of time to wait before timing out a LAN query request

Definition at line 170 of file PVROBeacon.h.


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