Browse Source

[RECOMPILE] Debug Simulate Connection Drop and reconnect handling

master
Tillman Staffen 1 month ago
parent
commit
ceb54ce1fe
  1. 6
      Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp
  2. 2
      Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h
  3. BIN
      Unreal/Plugins/AvatarCore_Manager/Content/AvatarCoreManager.uasset
  4. BIN
      Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset

6
Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Private/RealtimeAPI/AvatarCoreAIRealtime.cpp

@ -686,13 +686,15 @@ void UAvatarCoreAIRealtime::WebSocketSendAudioChunk(FString Base64AudioChunk)
}
}
void UAvatarCoreAIRealtime::DebugDisconnect(int32 DisconnectCode)
void UAvatarCoreAIRealtime::DebugSimulateConnectionDrop()
{
if (Socket == nullptr) {
BroadcastAIError("Trying to send something over WebSocket but Websocket is not initialized.", EAvatarCoreAIError::NotInitialized);
return;
}
Socket->Close(DisconnectCode);
Socket->Close();
SetNewState(EAvatarCoreAIState::Error, true);
BroadcastAIError("Simulated socket error 3008", EAvatarCoreAIError::ConnectionDropped);
}

2
Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h

@ -193,7 +193,7 @@ public:
//Simulate a disconnect with a disconnect code, to simulate server side socket closing
UFUNCTION(BlueprintCallable, Category = "AvatarCore AI|RealtimeAPI")
void DebugDisconnect(int32 DisconnectCode);
void DebugSimulateConnectionDrop();
private:

BIN
Unreal/Plugins/AvatarCore_Manager/Content/AvatarCoreManager.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Unreal/Plugins/AvatarCore_Manager/Content/Widgets/Debug/Pages/W_DebugAvatarCoreAI.uasset (Stored with Git LFS)

Binary file not shown.
Loading…
Cancel
Save