A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
ApexWebSocket Class Reference

#include <ApexWebSocket.h>

Public Member Functions

 ApexWebSocket ()
 
 ~ApexWebSocket ()
 
bool AttemptConnect (FString Uri, FString Protocol="wss")
 
 DECLARE_EVENT (ApexWebSocket, FApexSocketConnected)
 
 DECLARE_EVENT_OneParam (ApexWebSocket, FApexSocketAuthCodeRetrieved, FString AuthenticationCode)
 
 DECLARE_EVENT_OneParam (ApexWebSocket, FApexSocketAuthenticateComplete, class UVaRestJsonObject *LoginJsonObject)
 
 DECLARE_EVENT_OneParam (ApexWebSocket, FApexSocketConnectFailed, const FString &)
 
 DECLARE_EVENT_ThreeParams (ApexWebSocket, FApexSocketDisconnected, int32 StatusCode, const FString &Reason, bool bWasClean)
 
bool IsWebsocketConnected ()
 
FApexSocketAuthCodeRetrieved & OnApexAuthCodeRetrieved ()
 
FApexSocketAuthenticateComplete & OnApexAuthenticateComplete ()
 
FApexSocketConnected & OnApexWebSocketConnected ()
 
FApexSocketConnectFailed & OnApexWebSocketConnectFailed ()
 
FApexSocketDisconnected & OnApexWebSocketDisconnected ()
 
void RequestAuthorizationCode ()
 

Private Member Functions

void CleanUpRequests ()
 
void HandleAuthCodeReceived (UVaRestJsonObject *JsonObject)
 
void HandleAuthenticateComplete (UVaRestJsonObject *JsonObject)
 
void ProcessNextRequest ()
 
void SendData (FString Data)
 
void SetupSocket (TSharedPtr< IWebSocket > &Socket, FString Uri, FString Protocol)
 

Private Attributes

FApexSocketAuthCodeRetrieved ApexAuthCodeRetrievedEvent
 
FApexSocketAuthenticateComplete ApexAuthenticateCompleteEvent
 
FApexSocketConnected ApexConnectedEvent
 
FApexSocketConnectFailed ApexConnectFailedEvent
 
FApexSocketDisconnected ApexDisconnectedEvent
 
TArray< ApexWebSocketRequestTypePendingWebsocketRequests
 
TSharedPtr< IWebSocket > WebSocket
 

Detailed Description

Definition at line 45 of file ApexWebSocket.h.

Constructor & Destructor Documentation

◆ ApexWebSocket()

ApexWebSocket::ApexWebSocket ( )

Definition at line 15 of file ApexWebSocket.cpp.

◆ ~ApexWebSocket()

ApexWebSocket::~ApexWebSocket ( )

Definition at line 20 of file ApexWebSocket.cpp.

Member Function Documentation

◆ AttemptConnect()

bool ApexWebSocket::AttemptConnect ( FString Uri,
FString Protocol = "wss" )

Definition at line 30 of file ApexWebSocket.cpp.

Here is the call graph for this function:

◆ CleanUpRequests()

void ApexWebSocket::CleanUpRequests ( )
private

Definition at line 151 of file ApexWebSocket.cpp.

Here is the caller graph for this function:

◆ DECLARE_EVENT()

ApexWebSocket::DECLARE_EVENT ( ApexWebSocket ,
FApexSocketConnected  )

◆ DECLARE_EVENT_OneParam() [1/3]

ApexWebSocket::DECLARE_EVENT_OneParam ( ApexWebSocket ,
FApexSocketAuthCodeRetrieved ,
FString AuthenticationCode )

◆ DECLARE_EVENT_OneParam() [2/3]

ApexWebSocket::DECLARE_EVENT_OneParam ( ApexWebSocket ,
FApexSocketAuthenticateComplete ,
class UVaRestJsonObject * LoginJsonObject )

◆ DECLARE_EVENT_OneParam() [3/3]

ApexWebSocket::DECLARE_EVENT_OneParam ( ApexWebSocket ,
FApexSocketConnectFailed ,
const FString &  )

◆ DECLARE_EVENT_ThreeParams()

ApexWebSocket::DECLARE_EVENT_ThreeParams ( ApexWebSocket ,
FApexSocketDisconnected ,
int32 StatusCode,
const FString & Reason,
bool bWasClean )

◆ HandleAuthCodeReceived()

void ApexWebSocket::HandleAuthCodeReceived ( UVaRestJsonObject * JsonObject)
private

Definition at line 139 of file ApexWebSocket.cpp.

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

◆ HandleAuthenticateComplete()

void ApexWebSocket::HandleAuthenticateComplete ( UVaRestJsonObject * JsonObject)
private

Definition at line 146 of file ApexWebSocket.cpp.

Here is the caller graph for this function:

◆ IsWebsocketConnected()

bool ApexWebSocket::IsWebsocketConnected ( )

Definition at line 47 of file ApexWebSocket.cpp.

◆ OnApexAuthCodeRetrieved()

FApexSocketAuthCodeRetrieved & ApexWebSocket::OnApexAuthCodeRetrieved ( )
inline

Definition at line 53 of file ApexWebSocket.h.

◆ OnApexAuthenticateComplete()

FApexSocketAuthenticateComplete & ApexWebSocket::OnApexAuthenticateComplete ( )
inline

Definition at line 56 of file ApexWebSocket.h.

◆ OnApexWebSocketConnected()

FApexSocketConnected & ApexWebSocket::OnApexWebSocketConnected ( )
inline

Definition at line 59 of file ApexWebSocket.h.

◆ OnApexWebSocketConnectFailed()

FApexSocketConnectFailed & ApexWebSocket::OnApexWebSocketConnectFailed ( )
inline

Definition at line 62 of file ApexWebSocket.h.

◆ OnApexWebSocketDisconnected()

FApexSocketDisconnected & ApexWebSocket::OnApexWebSocketDisconnected ( )
inline

Definition at line 65 of file ApexWebSocket.h.

◆ ProcessNextRequest()

void ApexWebSocket::ProcessNextRequest ( )
private

Definition at line 120 of file ApexWebSocket.cpp.

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

◆ RequestAuthorizationCode()

void ApexWebSocket::RequestAuthorizationCode ( )

Definition at line 55 of file ApexWebSocket.cpp.

Here is the call graph for this function:

◆ SendData()

void ApexWebSocket::SendData ( FString Data)
private

Definition at line 156 of file ApexWebSocket.cpp.

Here is the caller graph for this function:

◆ SetupSocket()

void ApexWebSocket::SetupSocket ( TSharedPtr< IWebSocket > & Socket,
FString Uri,
FString Protocol )
private

Definition at line 65 of file ApexWebSocket.cpp.

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

Member Data Documentation

◆ ApexAuthCodeRetrievedEvent

FApexSocketAuthCodeRetrieved ApexWebSocket::ApexAuthCodeRetrievedEvent
private

Definition at line 85 of file ApexWebSocket.h.

◆ ApexAuthenticateCompleteEvent

FApexSocketAuthenticateComplete ApexWebSocket::ApexAuthenticateCompleteEvent
private

Definition at line 86 of file ApexWebSocket.h.

◆ ApexConnectedEvent

FApexSocketConnected ApexWebSocket::ApexConnectedEvent
private

Definition at line 87 of file ApexWebSocket.h.

◆ ApexConnectFailedEvent

FApexSocketConnectFailed ApexWebSocket::ApexConnectFailedEvent
private

Definition at line 88 of file ApexWebSocket.h.

◆ ApexDisconnectedEvent

FApexSocketDisconnected ApexWebSocket::ApexDisconnectedEvent
private

Definition at line 89 of file ApexWebSocket.h.

◆ PendingWebsocketRequests

TArray<ApexWebSocketRequestType> ApexWebSocket::PendingWebsocketRequests
private

Definition at line 83 of file ApexWebSocket.h.

◆ WebSocket

TSharedPtr<IWebSocket> ApexWebSocket::WebSocket
private

Definition at line 82 of file ApexWebSocket.h.


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