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

#include <MultiplayerWebSocket.h>

Public Member Functions

 MultiplayerWebSocket ()
 
 ~MultiplayerWebSocket ()
 
bool AttemptConnect (FString Uri, FString Protocol="wss")
 
 DECLARE_EVENT (MultiplayerWebSocket, FSocketConnected)
 
 DECLARE_EVENT_OneParam (MultiplayerWebSocket, FSocketConnectFailed, const FString &)
 
 DECLARE_EVENT_OneParam (MultiplayerWebSocket, FSocketMessageReceived, const FString &)
 
 DECLARE_EVENT_ThreeParams (MultiplayerWebSocket, FSocketDisconnected, int32 StatusCode, const FString &Reason, bool bWasClean)
 
void Disconnect ()
 
bool IsWebsocketConnected ()
 
FSocketConnected & OnWebSocketConnected ()
 
FSocketConnectFailed & OnWebSocketConnectFailed ()
 
FSocketDisconnected & OnWebSocketDisconnected ()
 
FSocketMessageReceived & OnWebSocketMessageReceived ()
 
void RequestMatchMake (int OrgId, int ModuleId)
 

Public Attributes

bool bShouldReplayLastRequestOnBadClose
 
bool bShouldRestartOnBadClose
 

Private Member Functions

void CleanUpRequests ()
 
void ProcessNextRequest ()
 
void SendData (FString Data)
 
void SetupSocket (TSharedPtr< IWebSocket > &Socket, FString Uri, FString Protocol)
 

Private Attributes

MultiplayerRequestData LastWebSocketRequest
 
TArray< MultiplayerRequestDataPendingWebsocketRequests
 
FSocketConnected SocketConnectedEvent
 
FSocketConnectFailed SocketConnectFailedEvent
 
FSocketDisconnected SocketDisconnectedEvent
 
FSocketMessageReceived SocketMessageReceivedEvent
 
FString SocketProtocol
 
FString SocketUri
 
TSharedPtr< IWebSocket > WebSocket
 

Detailed Description

Definition at line 20 of file MultiplayerWebSocket.h.

Constructor & Destructor Documentation

◆ MultiplayerWebSocket()

MultiplayerWebSocket::MultiplayerWebSocket ( )

Definition at line 13 of file MultiplayerWebSocket.cpp.

◆ ~MultiplayerWebSocket()

MultiplayerWebSocket::~MultiplayerWebSocket ( )

Definition at line 20 of file MultiplayerWebSocket.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AttemptConnect()

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

Definition at line 42 of file MultiplayerWebSocket.cpp.

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

◆ CleanUpRequests()

void MultiplayerWebSocket::CleanUpRequests ( )
private

Definition at line 165 of file MultiplayerWebSocket.cpp.

Here is the caller graph for this function:

◆ DECLARE_EVENT()

MultiplayerWebSocket::DECLARE_EVENT ( MultiplayerWebSocket ,
FSocketConnected  )

◆ DECLARE_EVENT_OneParam() [1/2]

MultiplayerWebSocket::DECLARE_EVENT_OneParam ( MultiplayerWebSocket ,
FSocketConnectFailed ,
const FString &  )

◆ DECLARE_EVENT_OneParam() [2/2]

MultiplayerWebSocket::DECLARE_EVENT_OneParam ( MultiplayerWebSocket ,
FSocketMessageReceived ,
const FString &  )

◆ DECLARE_EVENT_ThreeParams()

MultiplayerWebSocket::DECLARE_EVENT_ThreeParams ( MultiplayerWebSocket ,
FSocketDisconnected ,
int32 StatusCode,
const FString & Reason,
bool bWasClean )

◆ Disconnect()

void MultiplayerWebSocket::Disconnect ( )

Definition at line 26 of file MultiplayerWebSocket.cpp.

Here is the caller graph for this function:

◆ IsWebsocketConnected()

bool MultiplayerWebSocket::IsWebsocketConnected ( )

Definition at line 72 of file MultiplayerWebSocket.cpp.

Here is the caller graph for this function:

◆ OnWebSocketConnected()

FSocketConnected & MultiplayerWebSocket::OnWebSocketConnected ( )
inline

Definition at line 28 of file MultiplayerWebSocket.h.

Here is the caller graph for this function:

◆ OnWebSocketConnectFailed()

FSocketConnectFailed & MultiplayerWebSocket::OnWebSocketConnectFailed ( )
inline

Definition at line 31 of file MultiplayerWebSocket.h.

Here is the caller graph for this function:

◆ OnWebSocketDisconnected()

FSocketDisconnected & MultiplayerWebSocket::OnWebSocketDisconnected ( )
inline

Definition at line 34 of file MultiplayerWebSocket.h.

Here is the caller graph for this function:

◆ OnWebSocketMessageReceived()

FSocketMessageReceived & MultiplayerWebSocket::OnWebSocketMessageReceived ( )
inline

Definition at line 37 of file MultiplayerWebSocket.h.

Here is the caller graph for this function:

◆ ProcessNextRequest()

void MultiplayerWebSocket::ProcessNextRequest ( )
private

Definition at line 144 of file MultiplayerWebSocket.cpp.

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

◆ RequestMatchMake()

void MultiplayerWebSocket::RequestMatchMake ( int OrgId,
int ModuleId )

Definition at line 80 of file MultiplayerWebSocket.cpp.

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

◆ SendData()

void MultiplayerWebSocket::SendData ( FString Data)
private

Definition at line 170 of file MultiplayerWebSocket.cpp.

Here is the caller graph for this function:

◆ SetupSocket()

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

Definition at line 91 of file MultiplayerWebSocket.cpp.

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

Member Data Documentation

◆ bShouldReplayLastRequestOnBadClose

bool MultiplayerWebSocket::bShouldReplayLastRequestOnBadClose

Definition at line 55 of file MultiplayerWebSocket.h.

◆ bShouldRestartOnBadClose

bool MultiplayerWebSocket::bShouldRestartOnBadClose

Definition at line 54 of file MultiplayerWebSocket.h.

◆ LastWebSocketRequest

MultiplayerRequestData MultiplayerWebSocket::LastWebSocketRequest
private

Definition at line 60 of file MultiplayerWebSocket.h.

◆ PendingWebsocketRequests

TArray<MultiplayerRequestData> MultiplayerWebSocket::PendingWebsocketRequests
private

Definition at line 59 of file MultiplayerWebSocket.h.

◆ SocketConnectedEvent

FSocketConnected MultiplayerWebSocket::SocketConnectedEvent
private

Definition at line 62 of file MultiplayerWebSocket.h.

◆ SocketConnectFailedEvent

FSocketConnectFailed MultiplayerWebSocket::SocketConnectFailedEvent
private

Definition at line 63 of file MultiplayerWebSocket.h.

◆ SocketDisconnectedEvent

FSocketDisconnected MultiplayerWebSocket::SocketDisconnectedEvent
private

Definition at line 64 of file MultiplayerWebSocket.h.

◆ SocketMessageReceivedEvent

FSocketMessageReceived MultiplayerWebSocket::SocketMessageReceivedEvent
private

Definition at line 65 of file MultiplayerWebSocket.h.

◆ SocketProtocol

FString MultiplayerWebSocket::SocketProtocol
private

Definition at line 68 of file MultiplayerWebSocket.h.

◆ SocketUri

FString MultiplayerWebSocket::SocketUri
private

Definition at line 67 of file MultiplayerWebSocket.h.

◆ WebSocket

TSharedPtr<IWebSocket> MultiplayerWebSocket::WebSocket
private

Definition at line 58 of file MultiplayerWebSocket.h.


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