{"id":37676103,"url":"https://github.com/frankurcrazy/tcpchan","last_synced_at":"2026-01-16T12:14:24.885Z","repository":{"id":57473623,"uuid":"291667987","full_name":"frankurcrazy/tcpchan","owner":"frankurcrazy","description":"A simple TCP multiplexing library.","archived":false,"fork":false,"pushed_at":"2020-09-21T02:34:37.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T04:26:49.177Z","etag":null,"topics":["asyncio","bring-your-own-io","channel","multiplex","mux","python","stream","tcp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frankurcrazy.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}},"created_at":"2020-08-31T09:10:04.000Z","updated_at":"2024-08-13T16:07:32.000Z","dependencies_parsed_at":"2022-09-26T17:40:51.879Z","dependency_job_id":null,"html_url":"https://github.com/frankurcrazy/tcpchan","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/frankurcrazy/tcpchan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankurcrazy%2Ftcpchan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankurcrazy%2Ftcpchan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankurcrazy%2Ftcpchan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankurcrazy%2Ftcpchan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankurcrazy","download_url":"https://codeload.github.com/frankurcrazy/tcpchan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankurcrazy%2Ftcpchan/sbom","scorecard":{"id":409703,"data":{"date":"2025-08-11","repo":{"name":"github.com/frankurcrazy/tcpchan","commit":"705e2b9df2260b38f5164cd7d5db865c5a8fa766"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"36 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2021-865 / GHSA-vv2x-vrpj-qqpq","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: PYSEC-2021-62 / GHSA-hggm-jpg3-v476","Warn: Project is vulnerable to: PYSEC-2023-254 / GHSA-jfhm-5ghh-2f97","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: PYSEC-2021-63 / GHSA-rhm9-p9w5-fwm7","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx","Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c","Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph","Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj","Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: PYSEC-2021-140 / GHSA-9w8r-397f-prfh","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: PYSEC-2021-141 / GHSA-pq64-v7f5-gqh8","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2021-108 / GHSA-q2q7-5pp4-w6pg","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T22:22:48.191Z","repository_id":57473623,"created_at":"2025-08-18T22:22:48.191Z","updated_at":"2025-08-18T22:22:48.191Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asyncio","bring-your-own-io","channel","multiplex","mux","python","stream","tcp"],"created_at":"2026-01-16T12:14:19.968Z","updated_at":"2026-01-16T12:14:24.874Z","avatar_url":"https://github.com/frankurcrazy.png","language":"Python","readme":"# TCPChan\n\n[![PyPI version](https://badge.fury.io/py/tcpchan.svg)](https://badge.fury.io/py/tcpchan)\n\n***TCPChan*** is a TCP connection multiplexing library that enables working with\nmultiple*channels* in a single TCP connection. TCPChan can boost the efficiency\nof the short-lived connections by eliminating the overhead of connection setup,\nespecially in high-latency links (e.g. cross-continental links).\n\nThe core part of the library is decoupled from I/O libraries so it's possible to\nbring your own I/O library. For convenience, an Asyncio-based protocol\nimplementation is provided for easy integration with Asyncio applications.\n\nWarning: TCPChan is built for fun and educational purpose, it is not fully\ntested, and neither is it widely deployed. Use it at your own risk.\n\n## Guide\n\nWIP\n\n### Installation\n\n#### Install via Pip\n\n```bash\npip install tcpchan\n```\n\n#### Install latest version from GitHub\n\n```basb\ngit clone --depth 1 https://github.com/frankurcrazy/tcpchan\ncd tcpchan; pip install .\n```\n\n#### Dependencies\n\n1. python \u003e= 3.7\n1. fpack \u003e= 1.0.0\n\n### Usage\n\nWIP\n\n#### Channel\n\nInherit `tcpchan.core.chan.Channel` and implements `data_received` callback.\n\n```python\nfrom tcpchan.core.chan import Channel\n\nclass CustomChannel(Channel):\n    def data_received(self, data):\n        # Do stuff upon data reception\n```\n\n#### Connection\n\nCreate `ServerConnection` or `ClientConnection` instance upon connection\nestablishment in server/client. And pass the channel factory to the Connection.\n\n##### Server connection creation\n\n```python\nfrom tcpchan.core.conn import ServerConnection\n\nconn = ServerConnection(lambda: CustomChannel())\n```\n\n##### Client connection creation\n\n```python\nfrom tcpchan.core.conn import ClientConnection\n\nconn = ClientConnection(lambda: CustomChannel())\n```\n\n#### Events\n\n```python\nfrom tcpchan.core import (\n    HandshakeSuccess, DataTransmit,\n    ChannelCreated, ChannelClosed\n)\n```\n\n#### Asyncio\n\nTCPChan provides an Asyncio-based protocol implementation so that one can\neasily integrate TCPChan in their Asyncio applications.\n\nFor server-side application, `TCPChanServerProtocol` can be used, likewise,\nfor client-side application, `TCPChanClientProtocol` can be used.\n\n```python\nimport asyncio\nfrom tcpchan.aio import TCPChanServerProtocol\nfrom tcpchan.core.chan import Channel\n\n\nclass CustomChannel(Channel):\n    def data_received(self, data):\n        # Do stuff upon data reception\n        ...\n\n\nclass MyProtocol(TCPChanServerProtocol):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n        self._channels = {}  # Mapping for channels\n\n    def handshake_success(self):\n        # Do something on handshake success\n        ...\n\n    def handshake_failed(self, reason):\n        # Do something on handshake failure\n        ...\n\n    def channel_created(self, channel):\n        # Do something on channel creation\n        self._channels[channel.channel_id] = channel\n\n    def channel_closed(self, channel_id):\n        # Do something when a channel is closed\n        del self._channels[channel_id]\n\n\nloop = asyncio.get_event_loop()\n\n\n# To initialize `Protocol`, channel factory function is required.\nserver = await loop.create_server(\n    lambda: MyProtocol(lambda: CustomChannel()),\n    host=\"localhost\",\n    port=9487,\n    start_serving=True,\n)\nloop.run_forever()\n```\n\n## LICENSE\n\nBSD\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankurcrazy%2Ftcpchan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankurcrazy%2Ftcpchan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankurcrazy%2Ftcpchan/lists"}