{"id":32295018,"url":"https://github.com/qixi/game_socket","last_synced_at":"2026-03-07T02:33:05.094Z","repository":{"id":55525767,"uuid":"384108731","full_name":"QiXi/game_socket","owner":"QiXi","description":"Socket library for creating real-time multiplayer games. Based on TCP, with the ability to send messages over UDP (planned).","archived":false,"fork":false,"pushed_at":"2021-12-11T11:27:00.000Z","size":180,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-08-20T22:14:14.435Z","etag":null,"topics":["dart","game","game-development","io","online","server","socket","tcp"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/QiXi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-08T11:56:47.000Z","updated_at":"2023-05-21T03:48:06.000Z","dependencies_parsed_at":"2022-08-15T02:30:42.079Z","dependency_job_id":null,"html_url":"https://github.com/QiXi/game_socket","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/QiXi/game_socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QiXi%2Fgame_socket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QiXi%2Fgame_socket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QiXi%2Fgame_socket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QiXi%2Fgame_socket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QiXi","download_url":"https://codeload.github.com/QiXi/game_socket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QiXi%2Fgame_socket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280557084,"owners_count":26350569,"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-23T02:00:06.710Z","response_time":142,"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":["dart","game","game-development","io","online","server","socket","tcp"],"created_at":"2025-10-23T03:50:49.099Z","updated_at":"2025-10-23T03:50:51.322Z","avatar_url":"https://github.com/QiXi.png","language":"Dart","funding_links":["https://www.patreon.com/flutterio"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca title=\"Pub\" href=\"https://pub.dartlang.org/packages/game_socket\"\u003e\u003cimg alt=\"Pub Version\" src=\"https://img.shields.io/pub/v/game_socket?color=blue\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Game socket\nThe library was published in early access and is not stable, as it is being developed in parallel with other solutions. English is not a native language so there are no comments. At this stage, the library is for those who want to understand the source code and get a starting point for their solution or help me :)\n\n\n## Features\n* One library contains both Server and Client parts.\n* The API communication library is similar to `Socket.io`, but not compatible with this solution.\n* Contains a built-in binary protocol so you don't have to work at the byte level.\n* The transport layer uses `TCP`. To send game messages, it is planned to implement parallel work with `UDP`.\n* It implements such concepts as Multiplexing - interaction with several spaces through a single channel.\n\nSupport for `WebSocket` is not planned for the current day (but everything can change with the support of the community)\n\n\n## Examples\nExamples:\n* [`example/client/main.dart`](https://github.com/QiXi/game_socket/blob/master/example/client/main.dart)\n* [`example/server/main.dart`](https://github.com/QiXi/game_socket/blob/master/example/server/main.dart)\n\n\n## Protocol\n\nThe protocol is schematic based. This approach allows you to save the amount of data transferred, since the data type is not transferred with the message, and the length of the numbers is not serialized.\n\nData types used in the schema\n\n| Type | Size | Range |\n| ---- | ---- | ----- |\n| bool | 1 bit | true or false |\n| int8 | 1 byte | 0 to 255 |\n| int16 | 2 bytes | 0 to 65535 |\n| int32 | 4 bytes | 0 to 4294967295 |\n| string | 1 + value | 0 to 255 chars |\n| bytes | 2 + value | 0 to 65535 bytes |\n\n\nData types when writing or reading messages\n\n| Operation | Schema Type | Dart Type | Range |\n| --------- | ----------- | --------- | ----- |\n| putBool   | bool   | bool| true or false |\n| putInt    | int8   | int | -128 to 127 |\n| putUInt   | int8   | int | 0 to 255 |\n| putInt    | int16  | int | -32768 to 32767 |\n| putUInt   | int16  | int | 0 to 65535 |\n| putInt    | int32  | int | -2147483648 to 2147483647 |\n| putUInt   | int32  | int | 0 to 4294967295 |\n| putString | string | String | 0 to 255 chars |\n| putSingle | ~int8~ | double | 0 to 1 step ~0.004 |\n| putRadians | ~int16~ | double | step ~0.0002 |\n| putPayload | bytes | Uint8List | 0 to 65535 bytes |\n\n\n## Plans\n* Initialization for sending `UPD` diagrams.\n* Automatic connections and reconnections.\n* Expanding the possibilities for working with rooms.\n* Conducting stress tests.\n\n\n## Tips for Beginners\n* If you are developing a browser game, then you need a `WebSocket` solution.\n* When designing a game for real-time communication, `UDP` should be preferred, since` TCP` will cause a delay in the event of packet loss.\n\n\n## Support\nYou can support the development of libraries for creating multiplatform games in Flutter:\n\n[![Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/flutterio)\n\n\n## History of creation\nSources that could have influenced the development of this work:\n\n* https://jamesslocum.com/blog\n* https://github.com/socketio/engine.io-server-java\n* https://github.com/socketio/socket.io-server-java/\n* https://github.com/Jerenaux/binary-protocol-example\n* https://github.com/rikulo/socket.io-dart/\n\n___\nIf you can suggest a translation better than automatic ᕙ(☉̃ₒ☉‶)ว just do it","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqixi%2Fgame_socket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqixi%2Fgame_socket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqixi%2Fgame_socket/lists"}