{"id":19892610,"url":"https://github.com/compscidr/non-blocking-socket-test","last_synced_at":"2025-09-07T12:35:51.456Z","repository":{"id":89825178,"uuid":"471518546","full_name":"compscidr/non-blocking-socket-test","owner":"compscidr","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-05T17:49:53.000Z","size":7,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T01:35:13.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/compscidr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-18T21:13:36.000Z","updated_at":"2022-03-19T02:16:21.000Z","dependencies_parsed_at":"2023-12-05T18:46:19.342Z","dependency_job_id":"30da69ac-c64b-4ee6-9294-d7dd03cdff2c","html_url":"https://github.com/compscidr/non-blocking-socket-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fnon-blocking-socket-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fnon-blocking-socket-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fnon-blocking-socket-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compscidr%2Fnon-blocking-socket-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compscidr","download_url":"https://codeload.github.com/compscidr/non-blocking-socket-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241321020,"owners_count":19943841,"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","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":[],"created_at":"2024-11-12T18:24:26.515Z","updated_at":"2025-03-01T05:25:21.028Z","avatar_url":"https://github.com/compscidr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  non-blocking-socket-test\nWhipped up a quick demo to help debug some non-blocking sockets we're working on.\n\nFor now, the non-blocking socket is only on the client side, but it would be easy to extend the same pattern to the\nserver side.\n\nSELECT is used after the socket is put into non-blocking mode. We use SELECT to determine when the connection has been\nmade, and then we use it again to determine when the socket is ready to read from.\n\nTo keep it simple, the server only supports a single connection, but it could be extended to support multiple\nconcurrent connections by adding the read / write fd sets.\n\nThe server starts up, listens for a recv, and then sends a response.\nThe client connects, sends a message and the waits for a response. It then terminates. This could be extended to do this\nback and forth in a loop if desired.\n\nAnother further enhancement could be to not require a strict send / recv ordering, but to have either side be able to\nsend / recv in any order. This would be useful if one side wanted to periodically generate events that do or not dot\nrequire a response for.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fnon-blocking-socket-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompscidr%2Fnon-blocking-socket-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompscidr%2Fnon-blocking-socket-test/lists"}