KLingo Project Documentation 1.0.0
Unreal Engine 5.6 C++ Project Documentation
로딩중...
검색중...
일치하는것 없음
UWebSocketSystem.h
이 파일의 문서화 페이지로 가기
1// Copyright (c) 2025 Doppleddiggong. All rights reserved. Unauthorized copying, modification, or distribution of this file, via any medium is strictly prohibited. Proprietary and confidential.
2
7#pragma once
8
9#include "CoreMinimal.h"
10#include "Subsystems/GameInstanceSubsystem.h"
11#include "IWebSocket.h"
12#include "Macro.h"
13#include "UWebSocketSystem.generated.h"
14
22UCLASS(Blueprintable, BlueprintType)
23class ONEPIECE_API UWebSocketSystem : public UGameInstanceSubsystem
24{
25 GENERATED_BODY()
26
27public:
29
36 UFUNCTION(BlueprintCallable, Category = "WebSocket")
37 void Connect();
38
45 UFUNCTION(BlueprintCallable, Category = "WebSocket")
46 void Disconnect();
47
54 UFUNCTION(BlueprintCallable, Category = "WebSocket")
55 void SendPing();
56
63 UFUNCTION(BlueprintPure, Category = "WebSocket")
64 bool IsConnected() const;
65private:
66 virtual void Initialize(FSubsystemCollectionBase& Collection) override;
67 virtual void Deinitialize() override;
68
70 void OnConnected_Native();
71
74 void OnConnectionError_Native(const FString& InErrorMessage);
75
80 void OnClosed_Native(int32 StatusCode, const FString& Reason, bool bWasClean);
81
84 void OnMessage_Native(const FString& InMessage);
85
90 void OnBinaryMessage_Native(const void* Data, SIZE_T Size, bool bIsLastFragment);
91
93 TSharedPtr<IWebSocket> WebSocket;
94
96 bool bIsExpectingAudio = false;
97
98private:
100 static void LogNetwork(const FString& Message);
101};
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
WebSocket 기반 실시간 상호작용을 관리하는 게임 인스턴스 서브시스템입니다.
DEFINE_SUBSYSTEM_GETTER_INLINE(UWebSocketSystem)