{"id":20077109,"url":"https://github.com/giuliocorradini/pythonsocket","last_synced_at":"2025-08-23T22:04:20.035Z","repository":{"id":106254314,"uuid":"297607771","full_name":"giuliocorradini/PythonSocket","owner":"giuliocorradini","description":"Python Socket Examples using different approaches and I/O models.","archived":false,"fork":false,"pushed_at":"2020-10-19T20:22:42.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T00:53:16.273Z","etag":null,"topics":["af-inet","asyncio","client","client-server","examples","file-descriptor","file-sharing","python","python-socket","select","select-example","server","sock-stream","socket","socket-as-file-descriptor","socket-programming","socketserver","tcp"],"latest_commit_sha":null,"homepage":"","language":"Python","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/giuliocorradini.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":"2020-09-22T09:59:03.000Z","updated_at":"2020-10-27T11:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e98090aa-cdd2-4093-b90d-8b069d802074","html_url":"https://github.com/giuliocorradini/PythonSocket","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/giuliocorradini%2FPythonSocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuliocorradini%2FPythonSocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuliocorradini%2FPythonSocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuliocorradini%2FPythonSocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giuliocorradini","download_url":"https://codeload.github.com/giuliocorradini/PythonSocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509613,"owners_count":19974070,"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":["af-inet","asyncio","client","client-server","examples","file-descriptor","file-sharing","python","python-socket","select","select-example","server","sock-stream","socket","socket-as-file-descriptor","socket-programming","socketserver","tcp"],"created_at":"2024-11-13T15:06:07.054Z","updated_at":"2025-03-02T12:43:45.644Z","avatar_url":"https://github.com/giuliocorradini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PythonSocket\n\n\u003e Examples of TCP sockets using Python and different I/O models\n\n## Usage\n\nEvery script can be launched with up to 2 parameters: `host` and `port`.\nYou may provide them to either connect to a remote machine or to change\nport.\n\nDefault values for server scripts are host:`''`, port:`9999`.\n\nDefault values for client scripts are host:`localhost`, port:`9999`.\n\n## Echo\n\nThe simplest TCP server is the *echo* service, every byte received\nby a client is sent back to it (thus echoing its requests).\n\nThis simplicity makes the echo server suitable as an *Hello, world!* for\nsockets.\n\nAn example is provided using the select system call.\n\u003e wait_fd_select/echo_server_select.py\n\n## Sockets for dummies\n\nAs the name suggests, this is a simple implementation of a Layer 4 protocol\n(application) and provides a kickstart for socket programming, that you might\nfurther extend.\n\nDifferent examples are provided using different I/O models:\n- blocking I/O with *threading* in `naive_server.py`\n- blocking I/O with *socketserver* in `sockserver_mod.py` \n\n## Students File Protocol (form. test result uploader)\n\nThis is a simple file transfer program that provides a quick way to move files\nacross the network, and provides a basic and raw authentication mechanism.\n\nBoth server and client are provided in `students_file_trasnfer` directory.\n\n## Wait file descriptors with SELECT\n\nA non-blocking I/O model using POSIX syscall select is a portable way of\nprogramming networked applications.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuliocorradini%2Fpythonsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiuliocorradini%2Fpythonsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuliocorradini%2Fpythonsocket/lists"}