WebSocketBundle | Websocket server for Symfony applications | Websocket library

 by   GeniusesOfSymfony PHP Version: v3.15.0 License: MIT

kandi X-RAY | WebSocketBundle Summary

kandi X-RAY | WebSocketBundle Summary

WebSocketBundle is a PHP library typically used in Networking, Websocket, Symfony applications. WebSocketBundle has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

GosWebSocketBundle is a Symfony bundle built on top of Ratchet and Autobahn|JS designed to bring together websocket functionality in an easy-to-use application architecture.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              WebSocketBundle has a low active ecosystem.
              It has 594 star(s) with 146 fork(s). There are 23 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 42 open issues and 308 have been closed. On average issues are closed in 96 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of WebSocketBundle is v3.15.0

            kandi-Quality Quality

              WebSocketBundle has 0 bugs and 0 code smells.

            kandi-Security Security

              WebSocketBundle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              WebSocketBundle code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              WebSocketBundle is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              WebSocketBundle releases are available to install and integrate.
              WebSocketBundle saves you 1780 person hours of effort in developing the same functionality from scratch.
              It has 4942 lines of code, 408 functions and 122 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed WebSocketBundle and discovered the below as its top functions. This is intended to give you an instant insight into WebSocketBundle implemented functionality, and help decide if they suit your requirements.
            • On client disconnect .
            • Register the twig configuration .
            • Handles client errors .
            • Build the compiler .
            • Handle client rejected event .
            • Toggle timer
            • Returns the timeout in seconds .
            • Get directory path .
            • Get the interval interval .
            Get all kandi verified functions for this library.

            WebSocketBundle Key Features

            No Key Features are available at this moment for WebSocketBundle.

            WebSocketBundle Examples and Code Snippets

            No Code Snippets are available at this moment for WebSocketBundle.

            Community Discussions

            QUESTION

            Dependency Injection not working, but defined manually
            Asked 2018-Oct-05 at 14:03

            I'm new to Symfony and try to use the ClientManipulatorInterface service from gos/web-socket-bundle. My problem is that Symfony returns an error even if I configure the argument manually.

            I always get this error: Cannot autowire service "Foo\Bar\Controller\testTopic": argument "$clientManipulator" of method "__construct()" references interface "Gos\Bundle\WebSocketBundle\Client\ClientManipulatorInterface" but no such service exists. You should maybe
            alias this interface to the existing "gos_web_socket.websocket.client_manipulator" service.

            Here is my service.yaml:

            ...

            ANSWER

            Answered 2018-Oct-05 at 14:03

            You need to alias the ClientManipulatorInterface to one of it's implementations for Symfony to be able to autowire the dependency correctly:

            Source https://stackoverflow.com/questions/52667225

            QUESTION

            Websocket disconnects on subscribing
            Asked 2018-Sep-13 at 12:19

            I'm building an application where I can see realtime changes within the logs This application is build with the Symfony v4.1. There is this bundle that has a Web Socket server and client based on Ratchet and Autobahn.js

            I've setup all the requirements to make it work according to the documentation.

            • There's a Topic class:

            • pubsub routing is configured

            • The server runs

            • Client runs in javascript when page is loaded

            The script to connect works fine, until I subscribe to a channel/topic. The connection is immediately closed on the client side, without the server detecting it. Does anyone know how to solve this? Also, I'm curious what this responsecode WS-1007 means.

            Javascript:

            ...

            ANSWER

            Answered 2018-Sep-13 at 12:19

            So, I've found the solution eventually, the topic needs to be tagged in your services configuration

            services.yaml:

            Source https://stackoverflow.com/questions/52298414

            QUESTION

            Symfony4: Gos Websocket Error: MySQL server has gone away
            Asked 2018-Aug-06 at 07:16

            I have enabled the PDO Periodic Pings for GOS:WebSocketBundle, I'm still getting this error from time to time:

            ...

            ANSWER

            Answered 2018-Apr-17 at 12:52

            Solved. Problem was that I defined periodic timer inside Topic inside "onSubscribe" funciton like:

            Source https://stackoverflow.com/questions/49791176

            QUESTION

            php websocket ratchet doesn't fetch newest data from doctrine
            Asked 2018-Jul-29 at 15:55

            Quite fascinating fact I just found out while messing up with WebSocket application I am now building using Symfony 4.1 and https://github.com/GeniusesOfSymfony/WebSocketBundle (which is built upon PHP Ratchet).

            I wanted to fetch the newest data periodically from the MySQL database for testing purpose using $repository->find(2); but it always returned the same result even though I was changing data while being subscribed to the WebSocket channel.

            After quite a lot of hours of messing with the code and crying, I found out that for some reason Doctrine is caching results (or that is what I think it does).

            To test my theory, I created a service that handles fetching from the database with the following code:

            ...

            ANSWER

            Answered 2018-Jul-29 at 15:20

            I actually managed to figure this out myself.

            Doctrine's EntityManager find(...) method actually caches the result inside private field called $unitOfWork under an entity's name and entry ID.

            Every time you try to find something using $em->find(...) and it succeeds, the result is being stored inside $this->unitOfWork and if you try to fetch again the same thing it just loads from cache.

            Source https://stackoverflow.com/questions/51581350

            QUESTION

            Unable to install gos/react-amqp
            Asked 2018-Mar-23 at 19:05

            Context

            I am new to websockets, and trying to implement a notifications pusher on Symfony with the help of the WebsocketBundle, following this tutorial.

            The bundle is implementing 3 different pushers :

            • I tried using the zmq pusher and it just does not seem to fit with Windows (I am getting the exact same symptoms as in the linked post)

            • I then tried WebSocketPusher and when I run the WSServer the port I configured in config.yml is not even opening. Same symptom as this open issue

            • So, finally, I tried to use AMQP pusher and this time I cannot even install it, but as my google searches do not end up in github open issues, I think that I'm probably the one missing something here, and thus I'm posting here.

            Problem

            I installed the php extension and it does seem to work as it appears in my php extensions and does not give any errors.

            When I run the following command from the tutorial : composer require gos/react-amqp I am getting the following response :

            ...

            ANSWER

            Answered 2017-Aug-03 at 15:56

            Alright, so I finally got it working.

            For some reason composer would keep using the 2.1.0 version when it was never required.

            For those running into the same kind of composer error, here is what I did :

            • rm composer.lock

            • explicitely ask for the exact minimum required version, in my case : composer require evenement/evenement:2.0 You should see something like Updating evenement/evenement (v2.1.0 => v2.0.0) Downloading: 100% in the console

            • composer install

            Source https://stackoverflow.com/questions/45487450

            QUESTION

            websocket.ERROR: Connection error occurred Warning: SessionHandler::read(): Session is not active
            Asked 2017-Nov-15 at 06:41

            using GeniusesOfSymfony/WebSocketBundle with

            ...

            ANSWER

            Answered 2017-Nov-15 at 06:41

            Okey, finally figured it out, as in documentation (took time to find it), you cannot use native session handlers with ratchet, all i had to do, was:

            session_handler: "@session.handler.pdo"

            and everything works as expected.

            Source https://stackoverflow.com/questions/47280411

            QUESTION

            "Missing Service" When declare new Topic in Symfony
            Asked 2017-Oct-27 at 10:08

            I'm implementing sockets on my app, so I did these steps:

            1. Create the topic handler service, like this but with an Entity Manager on his __construct method.

              ...

            ANSWER

            Answered 2017-Oct-27 at 10:08

            The problem was, that im using service.yml when im in local enviroment and im not declared Entity Manager in my config_prod.yml file.

            So i solved creating the entity manager in all enviroments.

            Source https://stackoverflow.com/questions/46970357

            QUESTION

            NoSuchMethodError using dropwizard websocket jee7 bundle server
            Asked 2017-Sep-02 at 19:29

            I'm using Dropwizard for a REST server and dropwizard-websocket-jee7-bundle to enable websockets.
            For the websocket server I used this example.
            Testing the websocket server standalone works fine, but in combination with Dropwizard, when a client tries to connect (to ws://localhost:port/actions) it gets a 500 Internal Server Error (Error log below).
            I'm guessing there is some bad or missing configuration, but I can't figure our where.

            ServerExample:

            ...

            ANSWER

            Answered 2017-Sep-02 at 19:29

            Downgraded the dropwizard version I was using to the last reported version in the bundle (0.9.1) and this error is gone (although i have a null pointer exception now. will open a new question about that error).

            Source https://stackoverflow.com/questions/45987273

            QUESTION

            How to publish messages with GeniusesOfSymfony/WebSocketBundle?
            Asked 2017-Jul-18 at 09:36

            I used this plugin GeniusesOfSymfony/WebSocketBundle to integrate websockets in my application.

            However through the documentation I didn't find how to push data into the channel once we've subscribed to it, from outide the "socket/connect" event:

            ...

            ANSWER

            Answered 2017-Jul-18 at 09:36

            I just had to create a global scope variable "sendMessage" and instantiate it with the nested function :

            Source https://stackoverflow.com/questions/45037969

            QUESTION

            Can't make WebSocketBundle subscribe/publish works. I followed official tutorial, bad setup?
            Asked 2017-Jan-14 at 12:35

            I'm working on a Symfony2 application with WebSocketBundle.
            https://github.com/GeniusesOfSymfony/WebSocketBundle.
            The installation of the bundle has been done successfully.
            So, I run a websocket server (port 8080 in local) with simple command : "php app/console gos:websocket:server" while my symfony server is running (port 8000 in local).

            I setup a simple client javascript to use WebSocketBundle following official tutorial which is on the github of the bundle.

            When I come to a page on my website, I am correctly connected to the websocket server.
            The problem comes when I want to use functions subscribe() and publish() that allow a user to subscribe to a channel, when anybody publish something on this channel, the message is received by the subscriber.

            In my case, the message is not sent or received, I don't really know why because no revelant error is shown, I tried to follow as accurately as possible the official tutorial here :
            https://github.com/GeniusesOfSymfony/WebSocketBundle/blob/master/Resources/docs/TopicSetup.md
            But, unfortunately, I can't manage to make this works. That's why I solicit you to help me.

            I share you below the most revelant piece of code to show how the setup takes place :

            Client JavaScript :
            [/web/js/own_scripts/gws_lobby.js]

            ...

            ANSWER

            Answered 2017-Jan-13 at 09:48

            hi i write this post to give you another way to use websocket and symfony i have never use your aproche but i build many application using this tutorial if you find yourself stuck you can use it her

            Source https://stackoverflow.com/questions/41623024

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install WebSocketBundle

            You can download it from GitHub.
            PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/GeniusesOfSymfony/WebSocketBundle.git

          • CLI

            gh repo clone GeniusesOfSymfony/WebSocketBundle

          • sshUrl

            git@github.com:GeniusesOfSymfony/WebSocketBundle.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Websocket Libraries

            netty

            by netty

            ws

            by websockets

            websocket

            by gorilla

            websocketd

            by joewalnes

            koel

            by koel

            Try Top Libraries by GeniusesOfSymfony

            PubSubRouterBundle

            by GeniusesOfSymfonyPHP

            WebsocketAppDemo

            by GeniusesOfSymfonyPHP

            NotificationBundle

            by GeniusesOfSymfonyPHP

            WebSocketPhpClient

            by GeniusesOfSymfonyPHP

            PNCTLEventLoopEmitter

            by GeniusesOfSymfonyPHP