Skip to content

Commit

Permalink
unreal engine 5 changes
Browse files Browse the repository at this point in the history
- Only compile tested on win64 for now
  • Loading branch information
getnamo committed May 26, 2021
1 parent d424256 commit c96cd41
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions SocketIOClient.uplugin
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.6.0",
"EngineVersion" : "4.26.0",
"VersionName": "1.7.0",
"EngineVersion" : "5.0.0",
"FriendlyName": "Socket.IO Client",
"Description": "Real-time networking library Socket.IO Client usable from blueprints and c++.",
"Category": "Networking",
Expand Down
4 changes: 0 additions & 4 deletions Source/CoreUtility/Private/CUBlueprintLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,7 @@ void UCUBlueprintLibrary::SetSoundWaveFromWavBytes(USoundWaveProcedural* InSound
TFuture<UTexture2D*> UCUBlueprintLibrary::Conv_BytesToTexture_Async(const TArray<uint8>& InBytes)
{
//Running this on a background thread
#if ENGINE_MINOR_VERSION < 23
return Async<UTexture2D*>(EAsyncExecution::Thread,[InBytes]
#else
return Async(EAsyncExecution::Thread, [InBytes]
#endif
{
//Create wrapper pointer we can share easily across threads
struct FDataHolder
Expand Down
5 changes: 1 addition & 4 deletions Source/SIOJEditorPlugin/Private/SIOJ_BreakJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@ class FKCHandler_BreakJson : public FNodeHandlingFunctor

FBPTerminal* FieldNameTerm = Context.CreateLocalTerminal(ETerminalSpecification::TS_Literal);
FieldNameTerm->Type.PinCategory = CompilerContext.GetSchema()->PC_String;
#if ENGINE_MINOR_VERSION >= 13
FieldNameTerm->SourcePin = Pin;
#else
FieldNameTerm->Source = Pin;
#endif
//FieldNameTerm->Source = Pin;
FieldNameTerm->Name = FieldName.ToString();
FieldNameTerm->TextLiteral = FText::FromName(FieldName);

Expand Down
4 changes: 2 additions & 2 deletions Source/SIOJson/Private/SIOJsonObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ FString USIOJsonObject::EncodeJsonToSingleString() const
FString OutputString = EncodeJson();

// Remove line terminators
OutputString.Replace(LINE_TERMINATOR, TEXT(""));
(void)OutputString.Replace(LINE_TERMINATOR, TEXT(""));

// Remove tabs
OutputString.Replace(LINE_TERMINATOR, TEXT("\t"));
(void)OutputString.Replace(LINE_TERMINATOR, TEXT("\t"));

return OutputString;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/SocketIOClient/SocketIOClient.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public bool LoadLib(ReadOnlyTargetRules Target)
{
bool isLibrarySupported = false;

if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
if (Target.Platform == UnrealTargetPlatform.Win64)
{
isLibrarySupported = true;
}
Expand Down
9 changes: 7 additions & 2 deletions Source/SocketIOLib/Private/internal/sio_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#ifndef SIO_CLIENT_IMPL_H
#define SIO_CLIENT_IMPL_H

#ifndef SIO_TLS
#define SIO_TLS 0
#endif

/* This disables two things:
1) error 4503 where MSVC complains about
decorated names being too long. There's no way around
Expand Down Expand Up @@ -43,7 +47,7 @@
typedef websocketpp::config::debug_asio client_config;
#endif //SIO_TLS
#else
#if defined(SIO_TLS)
#if SIO_TLS
#include <websocketpp/config/asio_client.hpp>
typedef websocketpp::config::asio_tls_client client_config;
#else
Expand Down Expand Up @@ -220,7 +224,6 @@
std::string m_sid;
std::string m_base_url;
std::string m_query_string;
std::string m_path;
std::map<std::string, std::string> m_http_headers;

unsigned int m_ping_interval;
Expand Down Expand Up @@ -257,6 +260,8 @@

unsigned m_reconn_made;

std::string m_path;

friend class sio::client;
friend class sio::socket;
};
Expand Down
6 changes: 5 additions & 1 deletion Source/SocketIOLib/Private/sio_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
#include <cstdarg>
#include <functional>

#if DEBUG || _DEBUG
#ifndef DEBUG
#define DEBUG 0
#endif

#if DEBUG
#define LOG(x) std::cout << x
#else
#define LOG(x)
Expand Down

0 comments on commit c96cd41

Please sign in to comment.