Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Pulling in changes to optionally avoid defining API redirection macros in libWebSocket unreal headers
  • Loading branch information
Epic-RobCannaday committed Apr 19, 2021
1 parent 76ae91b commit d9077bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion libwebsockets-2.2/lib/unreal_socketapi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
// Copyright Epic Games, Inc. All Rights Reserved.

#ifdef __cplusplus
extern "C"
Expand Down Expand Up @@ -41,6 +41,8 @@ struct FSocketAPIDispatchTable
extern struct FSocketAPIDispatchTable* GSocketAPIDispatchTable;
extern void unreal_set_socketapi_table(struct FSocketAPIDispatchTable*);

#if !defined(UNREALSOCKET_NO_API_DEFINES)

#define shutdown(...) DISPATCH_FUNCTION(GSocketAPIDispatchTable, shutdown)(__VA_ARGS__)
#define recv(...) DISPATCH_FUNCTION(GSocketAPIDispatchTable, recv)(__VA_ARGS__)
#define close(...) DISPATCH_FUNCTION(GSocketAPIDispatchTable, close)(__VA_ARGS__)
Expand Down Expand Up @@ -68,6 +70,8 @@ extern void unreal_set_socketapi_table(struct FSocketAPIDispatchTable*);

#endif

#endif

#ifdef __cplusplus
}
#endif
7 changes: 6 additions & 1 deletion libwebsockets-2.2/lib/unreal_ssl.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved.
// Copyright Epic Games, Inc. All Rights Reserved.

#ifdef __cplusplus
extern "C"
Expand Down Expand Up @@ -31,6 +31,8 @@ struct FUnrealSSLDispatchTable
extern struct FUnrealSSLDispatchTable* GUnrealSSLDispatchTable;
extern void unreal_set_unreal_ssl_table(struct FUnrealSSLDispatchTable*);

#if !defined(UNREALSSL_NO_API_DEFINES)

#define SSL_CTX_new DISPATCH_FUNCTION(GUnrealSSLDispatchTable, ctx_new)
#define SSL_CTX_free DISPATCH_FUNCTION(GUnrealSSLDispatchTable, ctx_free)
#define SSL_new DISPATCH_FUNCTION(GUnrealSSLDispatchTable, new)
Expand All @@ -47,6 +49,9 @@ extern void unreal_set_unreal_ssl_table(struct FUnrealSSLDispatchTable*);
#define ERR_get_error(...) 0
#define ERR_error_string_n(...)
#define ERR_error_string(...) ""

#endif

#define UNREAL_SSL_ERROR_WOULDBLOCK -2

#endif
Expand Down

0 comments on commit d9077bb

Please sign in to comment.