Announcement

Collapse
No announcement yet.

[Plugin] Socket.io Client

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally 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 ?
    Open an issue with detailed steps to reproduce the error on https://github.com/getnamo/socketio-client-ue4/issues and I'll try to help
    Plugins: GES - Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo

    Comment


      Just 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.

      Comment


        Originally posted by DonFrag View Post
        Just 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.
        I appreciate the ping, that said the internal library (libWebSockets) has a few features missing compared to the external lib (websocketpp: largely c++11 vs c api and more control over underlying functionality) and with the boost-less build process used since v1.0, using the external library is painless. It would take a very specific advantage for the third party dependency to be swapped.
        Plugins: GES - Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo

        Comment


          I 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!

          Comment


            We 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 line
            Code:
            #define SIO_TLS 1
            as well as adding "OpenSSL" to the private and public dependency modules of SocketIOLib.Buid file. Had to fix some compilation errors but everything builds fine now.

            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);
            };
            Our socket lives under the resouce /play (https://api.xxxxx.com/play). I've tried every different configuration(joining the /play namespace, only using the base url etc. ) that I've been able to come up with and nothing has worked so far. I don't know if I'm being fooled by the log message and TLS is actually not being used. I've tried to look through the implementation, and I'm at my wits end.

            Any help is greatly appreciated.
            Last edited by osclindstrm; 09-29-2020, 05:47 AM.

            Comment


              Originally posted by osclindstrm View Post
              We 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 line
              Code:
              #define SIO_TLS 1
              as well as adding "OpenSSL" to the private and public dependency modules of SocketIOLib.Buid file. Had to fix some compilation errors but everything builds fine now.

              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);
              };
              Our socket lives under the resouce /play (https://api.xxxxx.com/play). I've tried every different configuration(joining the /play namespace, only using the base url etc. ) that I've been able to come up with and nothing has worked so far. I don't know if I'm being fooled by the log message and TLS is actually not being used. I've tried to look through the implementation, and I'm at my wits end.

              Any help is greatly appreciated.
              TLS/SSL is currently not supported, it requires some fixes in the underlying library used. See this issue for a workaround used in the past: https://github.com/getnamo/socketio-...-ue4/issues/39
              Plugins: GES - Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo

              Comment


                I 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.

                Comment


                  Originally posted by Skalbe View Post
                  I 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.
                  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.
                  Plugins: GES - Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo

                  Comment


                    Originally 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.
                    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?
                    Last edited by Skalbe; 10-11-2020, 12:11 PM.

                    Comment


                      Originally 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?
                      if its disabling the plugin it won't work right. If you're using a custom branch remove the engine version field from uplugin file and make sure your project has socket.io client plugin as a dependency in the uproject file.

                      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.
                      Plugins: GES - Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo

                      Comment

                      Working...
                      X