{"id":21001720,"url":"https://github.com/v4lli/go-abp","last_synced_at":"2025-03-13T13:44:38.808Z","repository":{"id":145948649,"uuid":"115670009","full_name":"v4lli/go-abp","owner":"v4lli","description":"Go-Implementation of the Alternating Bit Protocol","archived":false,"fork":false,"pushed_at":"2018-01-13T12:28:17.000Z","size":2253,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T09:47:01.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/v4lli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2017-12-29T00:23:55.000Z","updated_at":"2021-12-20T00:45:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"c07ba0bb-be09-40eb-9f36-62850ee84da6","html_url":"https://github.com/v4lli/go-abp","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/v4lli%2Fgo-abp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v4lli%2Fgo-abp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v4lli%2Fgo-abp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v4lli%2Fgo-abp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v4lli","download_url":"https://codeload.github.com/v4lli/go-abp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419052,"owners_count":20287803,"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-19T08:16:17.598Z","updated_at":"2025-03-13T13:44:38.769Z","avatar_url":"https://github.com/v4lli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-abp\n\nGo-Implementation of (a variation of?) the [Alternating Bit Protocol](https://en.wikipedia.org/wiki/Alternating_bit_protocol), with timers.\n\nThis demo implementation can be used to transmit (```sender/```)\nand receive (```receiver/```) a regular file over a possibly\nunreliable UDP channel. The protocol handles re-ordering (by enforcing\na strict order), bit flips in the header and payload (by calculating\nchecksums) and complete packet loss (sequence number).\n\n\n## ABP Header\n\nThe custom header is defined as follows:\n\n```\n0             15              31\n+------------------------------+\n|       CRC32 Checksum         |\n+--------------+---------------+\n|  PL Length   |   Flags       |\n+--------------+---------------+\n```\n\n* The checksum is calculated over the entire packet _except_ the first 32 bits\n  (This means bits 32 to PlLength+32).\n* The sequence number (aka. _alternating bit_) is implemented as a flag in the\n  Flags field. Other flags are HDR_FILENAME (indicating this packet contains\n  only the ASCII filename) and HDR_FIN (indicating an EOF to the receiver).\n* The maximum packet size is defined to be 512 bytes incl. header\n  (i.e. PlLength \u003c= 504) to conform with a guaranteed Internet MTU of 576.\n\n## Server (Receiver) FSM\n\n![server fsm](https://raw.githubusercontent.com/v4lli/go-abp/master/dia/receiver.png)\n\n## Client (Sender) FSM\n\n![client fsm](https://raw.githubusercontent.com/v4lli/go-abp/master/dia/sender.png)\n\n# Compile and Run\n\nThe receiver part:\n\n```\ncd receiver/ \u0026\u0026 ./test.sh\n```\n\ntest.sh sets a command line option which causes the receiver to\ndiscard and corrupt some packets randomly. This tests the robustness\nof the implementation, as all injected faults (duplicated packet,\ndropped packets, bit errors) should be handled by the protocol.\n\nThe client part (tests a running server process by sending a blob\nfile to the receiver):\n\n```\ncd sender/ \u0026\u0026 ./test.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv4lli%2Fgo-abp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv4lli%2Fgo-abp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv4lli%2Fgo-abp/lists"}