Announcement

Collapse
No announcement yet.

[Plugin] Socket.io Client

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

    Originally posted by DonFrag View Post

    When im testing the game i have two users connected. Then they start to connect and disconnect every time by no reason.
    Then i close PIE, and when i try to play again and the connection hangs and the editor crashes
    Thanks for the context, seems related to: https://github.com/getnamo/socketio-...ue4/issues/126 I'm still chasing down the root cause of it.

    Try an earlier release e.g.: https://github.com/getnamo/socketio-...ses/tag/0.10.0 which doesn't have the issue and let me know if it works. I've added a 4.22 version, but keep in mind that v0.10 only works on windows/linux
    Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

    Comment


      Originally posted by getnamo View Post

      Thanks for the context, seems related to: https://github.com/getnamo/socketio-...ue4/issues/126 I'm still chasing down the root cause of it.

      Try an earlier release e.g.: https://github.com/getnamo/socketio-...ses/tag/0.10.0 which doesn't have the issue and let me know if it works. I've added a 4.22 version, but keep in mind that v0.10 only works on windows/linux
      Im working with mobile in mind, so i am going to wait for the fix . By the way have you considered using socket as singleton instead//additionally to component?

      Comment


        Originally posted by DonFrag View Post

        Im working with mobile in mind, so i am going to wait for the fix . By the way have you considered using socket as singleton instead//additionally to component?
        If you want to use something not inheriting a uobject or wish to control it's life cycle, consider using the c++ base class FSocketIONative https://github.com/getnamo/socketio-...socketionative, It's still uses ue4 native types so the mental leap shouldn't be that hard. The USocketIOClientComponent uses this class under the hood and you can look into that class for example implementation.

        That said I've seen some pings for people wanting to spawn a UObject type in blueprints, maybe expose a singleton to create a component without attachment? I'd be wary to complicate the UX too much though. I'd generally recommend dropping an actor into the world with the component and forwarding your reference to the component elsewhere. Or if you're loading levels, use level streaming with a top level that is permanently loaded.
        Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

        Comment


          Thanks for your plugin.
          I connect to my own server using ip address like:http://0.0.0.0:0
          And it worked in windows.
          In the case of IOS platform,though I check the "Allow web connection to non-https websites",it doesnt work.Could you please give me some advise to solve the problem.Thanks.

          Comment


            Originally posted by getnamo View Post

            If you want to use something not inheriting a uobject or wish to control it's life cycle, consider using the c++ base class FSocketIONative https://github.com/getnamo/socketio-...socketionative, It's still uses ue4 native types so the mental leap shouldn't be that hard. The USocketIOClientComponent uses this class under the hood and you can look into that class for example implementation.

            That said I've seen some pings for people wanting to spawn a UObject type in blueprints, maybe expose a singleton to create a component without attachment? I'd be wary to complicate the UX too much though. I'd generally recommend dropping an actor into the world with the component and forwarding your reference to the component elsewhere. Or if you're loading levels, use level streaming with a top level that is permanently loaded.
            thank you im going to try it

            Comment


              Originally posted by DonFrag View Post

              thank you im going to try it
              Due to popular demand I've now added a way to statically construct a component correctly which should work largely anywhere, documentation for the new feature can be found here: https://github.com/getnamo/socketio-...ient-component

              The early release for this is available here: https://github.com/getnamo/socketio-...1.1.0e(1.0.11)

              It will also land in a stable release with other bugfixes later as 1.1.0.
              Last edited by getnamo; 08-07-2019, 02:00 PM.
              Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

              Comment


                Originally posted by getnamo View Post

                Due to popular demand I've now added a way to statically construct a component correctly which should work largely anywhere, documentation for the new feature can be found here: https://github.com/getnamo/socketio-...ient-component

                The early release for this is available here: https://github.com/getnamo/socketio-...es/tag/v1.1.0e

                It will also land in a stable release with other bugfixes later as 1.1.0.
                This is amazing.Handle it from the Gameinstance was exactly what i was looking for! great job

                Comment


                  Dear Folks,
                  unknowing if there is any information about it already (I found none), I post here in desperation for help

                  Right now I have a setup working with the plugin between two unreal projects to transmit data (pictures as binary, text and number information as json...). But it wont emit data that seems bigger than only a bit of text. And also it does not work if I repeatedly emit smaller things.
                  Click image for larger version

Name:	foreachdelay.JPG
Views:	1
Size:	358.5 KB
ID:	1653403
                  This is my setup to transmit images I collect. The image itself works great with the same setup without a loop.
                  But when I try this, I can see in the server console that it sends 2 or 3 times and then disconnects the client.

                  After that I have a ghost client that connects and disconnects. With other data I had the problem, that the ghost client kept reconnecting, even if I closed Unreal (it somehow kept a process running in the background with 20% CPU usage, and multiplied itself..)

                  At this Point I just have no idea where to start since I have no Idea what and where the Error comes from. Do I need to make another setting in the plugin? I use the node server that came with the chat server example, is that wrong?

                  I really appreciate any help or wink in the right direction!!

                  best
                  Luk

                  Comment


                    Originally posted by Lolukok View Post
                    Dear Folks,
                    unknowing if there is any information about it already (I found none), I post here in desperation for help

                    Right now I have a setup working with the plugin between two unreal projects to transmit data (pictures as binary, text and number information as json...). But it wont emit data that seems bigger than only a bit of text. And also it does not work if I repeatedly emit smaller things.
                    Click image for larger version

Name:	foreachdelay.JPG
Views:	1
Size:	358.5 KB
ID:	1653403
                    This is my setup to transmit images I collect. The image itself works great with the same setup without a loop.
                    But when I try this, I can see in the server console that it sends 2 or 3 times and then disconnects the client.

                    After that I have a ghost client that connects and disconnects. With other data I had the problem, that the ghost client kept reconnecting, even if I closed Unreal (it somehow kept a process running in the background with 20% CPU usage, and multiplied itself..)

                    At this Point I just have no idea where to start since I have no Idea what and where the Error comes from. Do I need to make another setting in the plugin? I use the node server that came with the chat server example, is that wrong?

                    I really appreciate any help or wink in the right direction!!

                    best
                    Luk
                    About the ghost client. do you have the connect options as automatic?
                    you use gamemode Begin and End? also looks like scooped connections has some issues.

                    Comment


                      Originally posted by Lolukok View Post
                      Dear Folks,
                      unknowing if there is any information about it already (I found none), I post here in desperation for help

                      Right now I have a setup working with the plugin between two unreal projects to transmit data (pictures as binary, text and number information as json...). But it wont emit data that seems bigger than only a bit of text. And also it does not work if I repeatedly emit smaller things.
                      Click image for larger version

Name:	foreachdelay.JPG
Views:	1
Size:	358.5 KB
ID:	1653403
                      This is my setup to transmit images I collect. The image itself works great with the same setup without a loop.
                      But when I try this, I can see in the server console that it sends 2 or 3 times and then disconnects the client.

                      After that I have a ghost client that connects and disconnects. With other data I had the problem, that the ghost client kept reconnecting, even if I closed Unreal (it somehow kept a process running in the background with 20% CPU usage, and multiplied itself..)

                      At this Point I just have no idea where to start since I have no Idea what and where the Error comes from. Do I need to make another setting in the plugin? I use the node server that came with the chat server example, is that wrong?

                      I really appreciate any help or wink in the right direction!!

                      best
                      Luk
                      I suspect it has to do with the standalone asio having some bug in the earlier v1.11 that is used in plugin v1.0. An early test inside https://github.com/getnamo/socketio-...tree/issue-126 which upgraded asio (to v1.13) seems to work with large data again (I've been testing it with raw audio binaries interwoven). If you want to try the unstable build, pull from issue-126 branch and compile. I'll be merging the potential fix into a stable build when I finally address issue-126 (reconnection cycle problem).
                      Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                      Comment


                        I made a change. When i stop the PIE while is emiting on update the editor crashes

                        added this line
                        if (!NativeClient.IsValid())return;

                        Comment


                          Hello!

                          I can't connect to server. Event ConnectionProblem is happened, but event Connect (or Disconnect) isn't. Actor with SocketIOClient Component place at level, server is ok too, I suppose. How can I to find out reason of this problem? What can I do?
                          http://prntscr.com/ow3b5j

                          Thanks for help.

                          Comment


                            Originally posted by DonFrag View Post
                            I made a change. When i stop the PIE while is emiting on update the editor crashes

                            added this line
                            if (!NativeClient.IsValid())return;

                            Nice! Likely only possible with statically allocated components, but this is a good catch. Open a pull request on https://github.com/getnamo/socketio-client-ue4 with the change and I'll merge it in
                            Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                            Comment


                              Originally posted by getnamo View Post

                              Nice! Likely only possible with statically allocated components, but this is a good catch. Open a pull request on https://github.com/getnamo/socketio-client-ue4 with the change and I'll merge it in
                              Uhm i don't know how to do that :/

                              Comment


                                Originally posted by DonFrag View Post

                                Uhm i don't know how to do that :/
                                If you're willing to try something new, check out https://help.github.com/en/articles/...a-pull-request to learn how to make a pull request.

                                The basics:
                                - Fork the repository so you get a local copy.
                                - Make the code change and commit to your local fork
                                - Open a pull request with the change to the main repository and I'll merge it in
                                Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                                Comment

                                Working...
                                X