{"id":18795299,"url":"https://github.com/diazvictor/sdl-net","last_synced_at":"2025-08-18T08:07:33.509Z","repository":{"id":54394021,"uuid":"340708894","full_name":"diazvictor/sdl-net","owner":"diazvictor","description":"A simple library for sending and receiving data (with Lua-SDL2)","archived":false,"fork":false,"pushed_at":"2021-02-21T02:36:01.000Z","size":96,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T11:51:15.002Z","etag":null,"topics":["lua","sdl2","sdl2-net"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/diazvictor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T17:11:52.000Z","updated_at":"2024-09-15T00:00:30.000Z","dependencies_parsed_at":"2022-08-13T14:20:33.671Z","dependency_job_id":null,"html_url":"https://github.com/diazvictor/sdl-net","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/diazvictor/sdl-net","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diazvictor%2Fsdl-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diazvictor%2Fsdl-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diazvictor%2Fsdl-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diazvictor%2Fsdl-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diazvictor","download_url":"https://codeload.github.com/diazvictor/sdl-net/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diazvictor%2Fsdl-net/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270962391,"owners_count":24675965,"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-08-18T02:00:08.743Z","response_time":89,"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":["lua","sdl2","sdl2-net"],"created_at":"2024-11-07T21:33:19.812Z","updated_at":"2025-08-18T08:07:33.475Z","avatar_url":"https://github.com/diazvictor.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"## sdl-net\n\nA simple library for sending and receiving data via networking with Lua-SDL2\n\n![Screenshot](screenshot.png)\n\nTo run this example:\n\n```\ncd example/\nlua server.lua\n```\n\nIn a separate terminal run `client.lua`\n\n## Dependencies\n\n- Lua 5.1 (or LuaJIT 2.0)\n- [Lua-SDL2](https://github.com/tangent128/luasdl2/)\n\n## Documentation\n\n* `sdl_net:new([username, host, port])`: This will create a new client. Arguments:\n    * (**string**) `username`: The user name. Default is \"johndoe\".\n    * (**string**) `host`: The Server to be connected to. Default is \"localhost\".\n    * (**number**) `port`: The Server port. Default is 5959.\n    _(note: you can also do require('sdl_net')(**ARGUMENTS**)_ \n\n* `sdl_net:connect()`: Establish the connection to the server.\n\n* `sdl_net:composer(message)`: Compose a message into JSON data. Arguments:\n    * (**string**) `message`: The message to be sent.\n\n* `sdl_net:send()`: Send the aftermentioned composite message.\n\n* `sdl_net:disconnect()`: Disconnect from the server.\n\n## Usage\n\n```lua\nlocal sdl_net = require 'sdl_net'\nlocal client = sdl_net:new()\n\nclient:connect()\nclient:composer('Hello World')\nclient:send()\nclient:disconnect()\n```\n\n### Usage 2:\n\n```lua\nlocal client = require('sdl_net')()\n\nclient:connect()\nclient:composer('Hello World')\nclient:send()\nclient:disconnect()\n```\n\n## TODO:\n\n* Implement the method to receive the messages (currently they are previewed in a separate script).\n\n## Contributing:\n\nPull requests are welcome. For major changes, please open an issue first and discuss what you would like to change.\n\nPlease make sure to update the tests as appropriate.\n\n## License:\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiazvictor%2Fsdl-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiazvictor%2Fsdl-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiazvictor%2Fsdl-net/lists"}