IWebSocket

Windows
MacOS
Linux

References

Module

WebSockets

Header

/Engine/Source/Runtime/Online/WebSockets/Public/IWebSocket.h

Include

#include "IWebSocket.h"

Syntax

class IWebSocket

Destructors

Name Description

Public function Virtual

~IWebSocket()

Functions

Name Description

Public function

void

 

Close

(
    int32 Code,
    const FString& Reason
)

Close the current connection.

Public function

void

 

Connect()

Initiate a client connection to the server.

Public function

bool

 

IsConnected()

Inquire if this web socket instance is connected to a server.

Public function

FWebSocketCl...

 

OnClosed()

Public function

FWebSocketCo...

 

OnConnected()

Public function

FWebSocketCo...

 

OnConnectionError()

Public function

FWebSocketMe...

 

OnMessage()

Public function

FWebSocketMe...

 

OnMessageSent()

Public function

FWebSocketRa...

 

OnRawMessage()

Public function

void

 

Send

(
    const FString& Data
)

Transmit data over the connection.

Public function

void

 

Send

(
    const void* Data,
    SIZE_T Size,
    bool bIsBinary
)

Transmit data over the connection.

Classes

Name

Description

Public class

FWebSocketClosedEvent

Delegate called when a web socket connection has been closed.

Public class

FWebSocketConnectedEvent

Delegate called when a web socket connection has been established successfully.

Public class

FWebSocketConnectionErrorEvent

Delegate called when a web socket connection could not be established.

Public class

FWebSocketMessageEvent

Delegate called when a web socket text message has been received.

Public class

FWebSocketMessageSentEvent

Delegate called when a web socket text message has been sent. Assume UTF-8 encoding.

Public class

FWebSocketRawMessageEvent

Delegate called when a web socket data has been received.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss