{"id":17196113,"url":"https://github.com/gsw945/flask-sio-demo","last_synced_at":"2026-04-16T04:32:24.175Z","repository":{"id":169239684,"uuid":"117783063","full_name":"gsw945/flask-sio-demo","owner":"gsw945","description":"flask socket.io demo","archived":false,"fork":false,"pushed_at":"2018-03-29T08:16:53.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T08:14:24.339Z","etag":null,"topics":["flask","flask-socketio","socket-io"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gsw945.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-17T04:17:56.000Z","updated_at":"2018-03-29T08:16:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1a58fa4-eaaa-4e78-ab55-87606bb073ec","html_url":"https://github.com/gsw945/flask-sio-demo","commit_stats":null,"previous_names":["gsw945/flask-sio-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gsw945/flask-sio-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsw945%2Fflask-sio-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsw945%2Fflask-sio-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsw945%2Fflask-sio-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsw945%2Fflask-sio-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gsw945","download_url":"https://codeload.github.com/gsw945/flask-sio-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gsw945%2Fflask-sio-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31871566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","flask-socketio","socket-io"],"created_at":"2024-10-15T01:52:25.291Z","updated_at":"2026-04-16T04:32:24.156Z","avatar_url":"https://github.com/gsw945.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"prepare for anwser: https://stackoverflow.com/questions/29461028/flask-rabbitmq-socketio-forwarding-messages\n\n\u003e my code running environment:\n\u003e * OS: ubuntu 16.04 LTS\n\u003e * Python: 3.5.2\n\u003e * pip: 9.0.1\n\n#### file description:\n```\n├── requirements.txt      -- packages list file (i use latest version)\n├── run_bad.py            -- incorrect example\n├── run.py                -- correct example\n├── sio_client.py         -- socket.io client call\n├── sio_server.py         -- cocket.io server call\n├── task_client.py        -- a udp client wrapper\n└── task_server.py        -- a udp server wrapper\n```\n\n#### setup \u0026 run\n```shell\npip install -r requirements.txt\n# one terminal window \npython run.py\n# another terminal window\npython task_server.py\n```\n\n#### look result\n1. open web browser, open http://127.0.0.1:5000/, we named this tab as tab1\n2. and, press F12 to open dev tool, and switch to **console** panel\n3. open another tab and open http://127.0.0.1:5000/task?msg=hello, we named this tab as tab2\n4. look at the console panel at tab1, you could see some output\n\n#### ps\n`run_bad.py` is an incorrect example\nDesign ideas:\n```\n-\u003e GET /task (Browser=\u003eServer)(http req1)\n    -\u003e socket.io\\[write_task_log\\] (Client=\u003eServer) (ws req2)\n        -\u003e socket.io\\[send_log\\] (Server=\u003eBrowser) (ws req3)\n```\nideas is ok, but, server is **Single Process** and **Single Thread**, so when **req2** created, **req1** isn't completed, then **req1** wait **req2** finish, but **req2** wait response from server, where is blocking at there now.\nso that, i need to create a external service to send request for **req2**, and udp connect request will immediately finish after send data, so **req1** will finish soon. **req2** can get server's response as expected, all is ok.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsw945%2Fflask-sio-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgsw945%2Fflask-sio-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgsw945%2Fflask-sio-demo/lists"}