{"id":14990002,"url":"https://github.com/xmidt-org/curlws","last_synced_at":"2026-03-08T21:36:55.315Z","repository":{"id":42541096,"uuid":"347236455","full_name":"xmidt-org/curlws","owner":"xmidt-org","description":"curlws is a websocket implementation that leverages libcurl.","archived":false,"fork":false,"pushed_at":"2023-10-11T18:50:57.000Z","size":606,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-19T10:25:37.410Z","etag":null,"topics":["curl","libcurl","websocket"],"latest_commit_sha":null,"homepage":"","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/xmidt-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSES/Apache-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-13T00:45:18.000Z","updated_at":"2022-12-31T05:45:51.000Z","dependencies_parsed_at":"2024-09-15T17:22:22.399Z","dependency_job_id":null,"html_url":"https://github.com/xmidt-org/curlws","commit_stats":{"total_commits":208,"total_committers":4,"mean_commits":52.0,"dds":"0.11057692307692313","last_synced_commit":"3bacb67621561f3d7cb964784b307b92ed473053"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":"xmidt-org/.go-template","purl":"pkg:github/xmidt-org/curlws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmidt-org%2Fcurlws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmidt-org%2Fcurlws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmidt-org%2Fcurlws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmidt-org%2Fcurlws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmidt-org","download_url":"https://codeload.github.com/xmidt-org/curlws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmidt-org%2Fcurlws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30274705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["curl","libcurl","websocket"],"created_at":"2024-09-24T14:19:18.214Z","updated_at":"2026-03-08T21:36:55.299Z","avatar_url":"https://github.com/xmidt-org.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2021 Comcast Cable Communications Management, LLC\nSPDX-License-Identifier: MIT\n--\u003e\n# curlws\n\ncurlws provides a cURL based websocket implementation.\n\n[![Build Status](https://github.com/xmidt-org/curlws/workflows/CI/badge.svg)](https://github.com/xmidt-org/curlws/actions)\n[![codecov.io](http://codecov.io/github/xmidt-org/curlws/coverage.svg?branch=main)](http://codecov.io/github/xmidt-org/curlws?branch=main)\n[![Coverity](https://img.shields.io/coverity/scan/23251.svg)](https://scan.coverity.com/projects/xmidt-org-curlws)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xmidt-org_curlws\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=xmidt-org_curlws)\n[![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/xmidt-org/curlws.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/xmidt-org/curlws/context:cpp)\n[![Autobahn Test Suite Compliance](https://img.shields.io/badge/autobahn%20websocket-strict%20compliance-blueviolet)](https://img.shields.io/badge/autobahn%20websocket-strict%20compliance-blueviolet)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xmidt-org/curlws/blob/main/LICENSE)\n[![GitHub Release](https://img.shields.io/github/release/xmidt-org/curlws.svg)](CHANGELOG.md)\n\n## Summary\n\ncURL is a leading networking library and tool for the c world, but it lacks\nwebsocket support.  `curlws` provides a complementary library that uses\nlibcurl for the initial handshakes and underlying socket handling.  Using libcurl\nas the foundation provides an extremely robust, tested and powerful framework\nfor `curlws`.\n\n## Getting started\n\nThe best place to start is the [cli](https://github.com/xmidt-org/curlws/tree/main/examples/cli)\nin the `examples/cli/` directory.  While a very simple application it shows the\npower of this little library.\n\nYou can find the api here: https://github.com/xmidt-org/curlws/blob/main/include/curlws/curlws.h\n\n## Design Patterns\n\n#### Single threaded by design\n\n`curlws` is not designed to handle a multi-threaded environment.  It certainly\ncan be used in one, but you will need to wrap it with the right threading magic\nbased on your choices and needs.\n\n#### Sane defaults, default secure\n\nProvide sane defaults.  All you need to get started is a URL and a zeroed out\nconfiguration structure.  If there is a choice of secure or insecure, we choose\nsecurity and let you degrade as you see fit.\n\n#### Leverage cURL \u0026 it's design patterns\n\nWhile not everything was brought over from cURL, the callbacks and how you drive\nthe event thread with the `curl_multi_*` code should be familiar to most folks.\nThat also means there is a way to configure the cURL easy object with whatever\nparameters and commands you want that we don't have today.\n\n#### Quality and security first\n\nThere is nothing worse than a library that almost works right, but just doesn't.\nThe authors of `curlws` strive to be spec compliant and do so in flying colors.\n\n\n## Building and Testing\n\n### Start the Autobahn test server (Only needed to test)\n\nThis requires docker.\n\n```\n./tools/autobahn.sh\n```\n\n### Build the code\n\n```\nmeson setup --warnlevel 3 --werror build\ncd build\nninja all test coverage\nfirefox meson-logs/coveragereport/index.html\n```\n\n#### Meson Configuration Options\n\nSee: https://github.com/xmidt-org/curlws/blob/main/meson_options.txt\n  \n### Testing\n\nTo `validate` you will need `jq` installed.\nTo produce coverage results you need `lcov` installed.\n\n```\nninja all test autobahn_collect autoban_validate coverage\n```\n\n### Look at the results\n\nThe local autobahn server reports results here: http://localhost:8080\n\nThe lcov local code/branch coverage results can be found at `build/meson-logs/coveragereport/index.html`\n\n## Code of Conduct\n\nThis project and everyone participating in it are governed by the [XMiDT Code Of Conduct](https://xmidt.io/code_of_conduct/). \nBy participating, you agree to this Code.\n\n\n## Contributing\n\nRefer to [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmidt-org%2Fcurlws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmidt-org%2Fcurlws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmidt-org%2Fcurlws/lists"}