Originally posted by DK Buzzin
View Post
Announcement
Collapse
No announcement yet.
[Plugin] Socket.io Client
Collapse
X
-
getnamo replied
-
DK Buzzin repliedOriginally posted by getnamo View Post
I'm not aware of any UE4 code plugin working with HTML5. If there is documentation on how to get that working I'd be interested to see it. The plugin so far supports Windows and Linux platforms, but it's open source so if any contributors get something working, consider making a pull request and I'll include it.
Your best bet at this time would probably to use inbuilt UE4 get/post html commands.
https isn't currently supported (use http) due to a bug in the underlying library which requires OpenSSL to be compiled in and use two different paths based on endpoints. Issue is currently tracked here https://github.com/getnamo/socketio-...-ue4/issues/39
Leave a comment:
-
DK Buzzin repliedOriginally posted by DK Buzzin View PostHi there! ....
When I do things this way now the project fails to package. I am going to post the log below. If I can't get this to work in the next 48 hours I am going to ditch the plugin and go with basic http requests. That is less than ideal though because my app is based on two way communication.
Packaging Log:
In file included from D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/connection.hpp:1640:
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(228,9): error: cannot use 'throw' with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(299,9): error: cannot use 'throw' with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(332,9): error: cannot use 'throw' with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(482,9): error: cannot use 'throw' with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(520,9): error: cannot use 'throw' with exceptions disabled
throw exception(ec);
^
D:\Documents\ChessLeague\UE4ChessLeague\ChessLeague\Plugins\socketio-client-ue4\Source\ThirdParty\websocketpp\websocketpp/impl/connection_impl.hpp(548,9): error: cannot use 'throw' with exceptions disabled
throw exception("Call to set_status from invalid state",
^
Leave a comment:
-
DK Buzzin repliedHi there! I just bought your plugin today and have been trying to get it to work with HTML 5. When I run it in editor (or packaged for windows) it is able to connect to the socket/ server just fine. However, when I package it out and run it in the browser, soon as I try to emit an event the game crashes and gives an error:
Uncaught abort(197) at Error at jsStackTrace (blob:http://127.0.0.1:5500/0cd32848-f0c9-...1c50698:654:12) at stackTrace (blob:http://127.0.0.1:5500/0cd32848-f0c9-...1c50698:669:11) at abort (blob:http://127.0.0.1:5500/0cd32848-f0c9-...50698:21005:43) at nullFunc_viii (blob:http://127.0.0.1:5500/0cd32848-f0c9-...c50698:17194:2) at b197 (:wasm-function[130013]:0x3b8495d) at UObject::execCallMathFunction(UObject*, FFrame&, void*) [__ZN7UObject20execCallMathFunctionEPS_R6FFramePv] (:wasm-function[14313]:0x687dbf) at UObject::execLetObj(UObject*, FFrame&, void*) [__ZN7UObject10execLetObjEPS_R6FFramePv] (:wasm-function[14335]:0x68d639) at ProcessLocalScriptFunction(UObject*, FFrame&, void*) [__Z26ProcessLocalScriptFunctionP7UObjectR6FFramePv] (:wasm-function[14444]:0x69bc6c) at void ProcessScriptFunction(UObject*, UFunction*, FFrame&, void*, void (*)(UObject*, FFrame&, void*)) [__Z21ProcessScriptFunctionIPFvP7UObjectR6FFramePvEEvS1_P9UFunctionS3_S4_T_] (:wasm-function[14445]:0x69cc02) at ProcessLocalFunction(UObject*, UFunction*, FFrame&, void*) [__Z20ProcessLocalFunctionP7UObjectP9UFunctionR6FFramePv] (:wasm-function[14443]:0x69ae28)
Has anyone tried using this plugin with HTML5? Any help or ideas appreciated.Last edited by DK Buzzin; 01-13-2021, 03:11 PM.
Leave a comment:
-
getnamo repliedOriginally posted by Skalbe View Post
Heya! Truly appreciate your activity here.
Funnily enough my server test project stopped connecting to my local server from Quest after a rebuild again and I haven't a clue why, as I did not change any content. The rebuild was a sanity check test after I had replicated the settings to the main project with the content etc and it wouldn't work there either.
I have tried cleaning everything through the ADB, uninstalling from Quest, rebuilding with deleting Intermediate folders etc, but nothing helps. I suspect it's something with the settings of permissions when deploying to the Quest, but I really don' t know. Would you perhaps have some pointers, as you are also working with the Quest?
I definitely had it working once and I could just launch the server and launch the app from the quest and it connected, but no more.
The next step that I will try is building with socket.io, I suppose, but I am building from Oculus 4.25.3 sdk branch and it keeps saying that the plugin is made for 4.25.0 and disabling it on build.
Edit: still struggling to achieve consistent behavior for the connectivity. Sometimes when I build to Quest, it connects to the dedicated server, sometimes it just doesn't.
And when I build server with socket.io, it gives me this: https://prnt.sc/ux7ius
Am I supposed to install some third party stuff for this to work?
With those, recompile your project and it should re compile the plugin for your engine version.
Usually when I dev quest stuff I just use a canonical engine version and select android as build target with relevant oculus plugins enabled, so YMMV.
Leave a comment:
-
Skalbe repliedOriginally posted by getnamo View Post
I use this plugin to connect services to quest projects, so it definitely compiles are and runs on the quest. You just need a socket.io type server and point your quest client to the server url or ip with port thats running the socket.io server.
Funnily enough my server test project stopped connecting to my local server from Quest after a rebuild again and I haven't a clue why, as I did not change any content. The rebuild was a sanity check test after I had replicated the settings to the main project with the content etc and it wouldn't work there either.
I have tried cleaning everything through the ADB, uninstalling from Quest, rebuilding with deleting Intermediate folders etc, but nothing helps. I suspect it's something with the settings of permissions when deploying to the Quest, but I really don' t know. Would you perhaps have some pointers, as you are also working with the Quest?
I definitely had it working once and I could just launch the server and launch the app from the quest and it connected, but no more.
The next step that I will try is building with socket.io, I suppose, but I am building from Oculus 4.25.3 sdk branch and it keeps saying that the plugin is made for 4.25.0 and disabling it on build.
Edit: still struggling to achieve consistent behavior for the connectivity. Sometimes when I build to Quest, it connects to the dedicated server, sometimes it just doesn't.
And when I build server with socket.io, it gives me this: https://prnt.sc/ux7ius
Am I supposed to install some third party stuff for this to work?Last edited by Skalbe; 10-11-2020, 12:11 PM.
Leave a comment:
-
getnamo repliedOriginally posted by Skalbe View PostI am trying to develop a technical demo for Oculus Quest and my current ordeal is that it wont connect to a dedicated host server on the local WiFi network. Both machines are on the same network and I can ping the oculus quest from the server machine. Don't know how to ping the machine from the Quest, but regardless, the game can connect to the dedicated server from another windows machine that is on the same network, but not from the oculus, which runs android. I`ve added all the possible permissions to the android permission list, but to no avail. Oculus runs Android so I`m wondering if this plugin could solve my issue out of the box, but it seems like it deals with just communication layer, not the connection layer.
Would be thankful if someone could confirm or deny this. Or maybe someone has experience building this plugin into an android game and connecting to another device.
Weirdly enough, today it decided to start working just as intended without any additional hassle. Updated and rebuilt the engine and rebuilt the project, although I had done it before like times 10 at least.
Leave a comment:
-
Skalbe repliedI am trying to develop a technical demo for Oculus Quest and my current ordeal is that it wont connect to a dedicated host server on the local WiFi network. Both machines are on the same network and I can ping the oculus quest from the server machine. Don't know how to ping the machine from the Quest, but regardless, the game can connect to the dedicated server from another windows machine that is on the same network, but not from the oculus, which runs android. I`ve added all the possible permissions to the android permission list, but to no avail. Oculus runs Android so I`m wondering if this plugin could solve my issue out of the box, but it seems like it deals with just communication layer, not the connection layer.
Would be thankful if someone could confirm or deny this. Or maybe someone has experience building this plugin into an android game and connecting to another device.
Weirdly enough, today it decided to start working just as intended without any additional hassle. Updated and rebuilt the engine and rebuilt the project, although I had done it before like times 10 at least.Last edited by Skalbe; 10-07-2020, 07:47 AM.
Leave a comment:
-
getnamo repliedOriginally posted by osclindstrm View PostWe are getting issues while trying to connect to our Socket.IO api.
Basically the only log we recieve from the socket is this:Code:SocketIOLog: SocketIO Invalid appears to have lost connection, reconnecting attempt 0 with delay 5000
This is despite the not getting a connection started in the first place.
I have changed the sio_client_impl.h & cpp files to use TLS by adding this lineCode:#define SIO_TLS 1
This is what my connection code looks like:
Code:TSharedPtr<FJsonObject> QueryParams = MakeShareable(new FJsonObject); QueryParams->SetStringField("token", TokenForPlay); Socket->VerboseLog = true; Socket->Connect(FString(Base_URL + "/play"), QueryParams, nullptr); Socket->OnConnectedCallback = [this](const FString& InSessionId) { Log(2, "Connected", Info); };
Any help is greatly appreciated.
Leave a comment:
-
osclindstrm repliedWe are getting issues while trying to connect to our Socket.IO api.
Basically the only log we recieve from the socket is this:Code:SocketIOLog: SocketIO Invalid appears to have lost connection, reconnecting attempt 0 with delay 5000
This is despite the not getting a connection started in the first place.
I have changed the sio_client_impl.h & cpp files to use TLS by adding this lineCode:#define SIO_TLS 1
This is what my connection code looks like:
Code:TSharedPtr<FJsonObject> QueryParams = MakeShareable(new FJsonObject); QueryParams->SetStringField("token", TokenForPlay); Socket->VerboseLog = true; Socket->Connect(FString(Base_URL + "/play"), QueryParams, nullptr); Socket->OnConnectedCallback = [this](const FString& InSessionId) { Log(2, "Connected", Info); };
Any help is greatly appreciated.
Last edited by osclindstrm; 09-29-2020, 05:47 AM.
Leave a comment:
-
Juha Ojala repliedI have been trying to upgrade my project to 4.25 version, but this Plugin gives me an error when packaging the game. No errors when compiling. Any updates to the plugin? Thanks!
Leave a comment:
-
getnamo repliedOriginally posted by DonFrag View PostJust fyi, i wanted to implement websockets instead of socket.io and i realized that you are using a external websocket library, buy i found that ue4 has its own websocket library, in case you need to replace for a internal solution.
Leave a comment:
-
DonFrag repliedJust fyi, i wanted to implement websockets instead of socket.io and i realized that you are using a external websocket library, buy i found that ue4 has its own websocket library, in case you need to replace for a internal solution.
Leave a comment:
-
getnamo repliedOriginally posted by HashemShepard View Post
thanks for your reply , i switched to the http version and still got the exact same error , anything else to try ?
Leave a comment:
-
HashemShepard repliedOriginally posted by getnamo View Post
https /SSL is currently not supported yet, use http. See https://github.com/getnamo/socketio-...-ue4/issues/39 for updates on the issue
Leave a comment:
Leave a comment: