{"id":13664568,"url":"https://github.com/floatinghotpot/socket.io-unity","last_synced_at":"2025-10-07T05:12:07.542Z","repository":{"id":37549252,"uuid":"92625635","full_name":"floatinghotpot/socket.io-unity","owner":"floatinghotpot","description":"socket.io client for Unity, power game client with node.js back-end","archived":false,"fork":false,"pushed_at":"2018-05-19T17:18:49.000Z","size":369,"stargazers_count":496,"open_issues_count":39,"forks_count":75,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-06-30T11:51:36.136Z","etag":null,"topics":["game-development","json","socket-io","unity","websocket"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/floatinghotpot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T21:42:37.000Z","updated_at":"2025-06-24T02:26:03.000Z","dependencies_parsed_at":"2022-08-26T15:22:46.545Z","dependency_job_id":null,"html_url":"https://github.com/floatinghotpot/socket.io-unity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/floatinghotpot/socket.io-unity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatinghotpot%2Fsocket.io-unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatinghotpot%2Fsocket.io-unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatinghotpot%2Fsocket.io-unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatinghotpot%2Fsocket.io-unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floatinghotpot","download_url":"https://codeload.github.com/floatinghotpot/socket.io-unity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floatinghotpot%2Fsocket.io-unity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"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":["game-development","json","socket-io","unity","websocket"],"created_at":"2024-08-02T05:02:59.982Z","updated_at":"2025-10-07T05:12:07.527Z","avatar_url":"https://github.com/floatinghotpot.png","language":null,"funding_links":[],"categories":["miscellaneous","Others"],"sub_categories":[],"readme":"# socket.io-unity\n\n![unity-nodejs](Demo/unity-nodejs.jpg)\n\nSocket.IO Client Library for Unity (mono / .NET 2.0), which is ported from the [JavaScript client](https://github.com/Automattic/socket.io-client) version [1.1.0](https://github.com/socketio/socket.io-client/releases/tag/1.1.0).\n\n[SocketIoClientDotNet](https://github.com/Quobject/SocketIoClientDotNet) by Quobject is a very good project, but it does not support Unity. So I spent a few overnights to port it to mono/.NET 2.0.\n\nNow game developers can:\n* use node.js to develop game server, enjoy the powerful ecosystem of network and database, easily deploy to cloud;\n* use Unity to develop game client, enjoy the poweful game engine and IDE.\n* use websocket / socket.io to communicate between server/client.\n\n## Installation\n\nDownlaod socket.io.unitypackage and then import into Unity.\n\nOr, only download the following files in Lib and put to Unity project:\n* WebSocket4Net.dll\n* SocketIoClientDotNet.dll\n* Newtonsoft.Json.dll\n\nIt's available on [Unity Asset Store](https://www.assetstore.unity3d.com/en/#!/content/92068) for $10, but you can also download it for FREE here.\n\nIf you are interested to dig into the source code, welcome to fork the [SocketIoClientDotNet for .NET 2.0](https://github.com/floatinghotpot/SocketIoClientDotNet/tree/net20).\n\n## Usage\nsocket.io client for Unity has a similar api to those of the [JavaScript client](https://github.com/Automattic/socket.io-client).\n\n```cs\nusing Quobject.SocketIoClientDotNet.Client;\n\nvar socket = IO.Socket(\"http://localhost:3000\");\nsocket.On(Socket.EVENT_CONNECT, () =\u003e\n{\n  socket.Emit(\"hi\");\n});\nsocket.On(\"hi\", (data) =\u003e\n{\n  Debug.Log(data);\n  socket.Disconnect();\n});\n```\n\nAnd, with Newtonsoft.Json.dll, we can easliy serialize / deserialize json object. Read more about [Newtonsoft.Json](http://www.newtonsoft.com/json).\n\n## Features\nThis library supports all of the features the JS client does, including events, options and upgrading transport.\n\n## Framework Versions\nMono, .NET 2.0\n\n## Demo\n* [node.js example code, chat server](Demo/test-server/index.js)\n* [HTML example code, web-based chat client](Demo/test-server/index.html)\n* [Unity C# example code, chat client](Demo/SocketIOScript.cs)\n\n## Comparison\n\nProject | Author | Popularity | Status\n---|---|---|---\n[socket.io-unity](https://github.com/floatinghotpot/socket.io-unity) | floatinghotpot | new | ACTIVE, support .NET 2.0 and Unity\n[SocketIoClientDotNet](https://github.com/Quobject/SocketIoClientDotNet) | Quobject | 323 stars | ACTIVE, support .NET 3.5 and higher, but not compatible with .NET 2.0 and Unity\n[UnitySocketIO](https://github.com/NetEase/UnitySocketIO) | NetEase | 547 stars | no longer maintained, not compatible with socket.io 1.x and later\n[unity-socket.io-DEPRECATED](https://github.com/fpanettieri/unity-socket.io-DEPRECATED) | fpanettieri | 189 stars | no longer maintained\n[UnitySocketIO-WebSocketSharp](https://github.com/kaistseo/UnitySocketIO-WebSocketSharp) | kaistseo | 108 stars | no longer maintained\n\n## Credit\n\nThanks to the authors of following projects:\n* [SocketIoClientDotNet](https://github.com/Quobject/SocketIoClientDotNet) by Quobject, a Socket.IO Client Library for C#\n* [WebSocket4Net](https://github.com/kerryjiang/WebSocket4Net) by Kerry Jiang, a .NET websocket client implementation.\n* [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) by JamesNK, a popular high-performance JSON framework for .NET\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatinghotpot%2Fsocket.io-unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloatinghotpot%2Fsocket.io-unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloatinghotpot%2Fsocket.io-unity/lists"}