{"id":20607487,"url":"https://github.com/loopj/tcpclient","last_synced_at":"2025-04-15T03:55:34.178Z","repository":{"id":66915913,"uuid":"52194236","full_name":"loopj/tcpclient","owner":"loopj","description":"Arduino-Style POSIX TCP Client","archived":false,"fork":false,"pushed_at":"2016-02-21T06:45:08.000Z","size":3,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T03:55:28.357Z","etag":null,"topics":[],"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/loopj.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}},"created_at":"2016-02-21T06:36:53.000Z","updated_at":"2022-09-21T15:28:39.000Z","dependencies_parsed_at":"2023-03-05T20:45:44.072Z","dependency_job_id":null,"html_url":"https://github.com/loopj/tcpclient","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/loopj%2Ftcpclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopj%2Ftcpclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopj%2Ftcpclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopj%2Ftcpclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopj","download_url":"https://codeload.github.com/loopj/tcpclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003952,"owners_count":21196794,"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-16T10:07:34.590Z","updated_at":"2025-04-15T03:55:34.159Z","avatar_url":"https://github.com/loopj.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino-Style POSIX TCP Client\n\nArduino's [`EthernetClient`](https://www.arduino.cc/en/Reference/EthernetClient)/[`WiFiClient`](https://www.arduino.cc/en/Reference/WiFiClient) classes and Particle's [`TCPClient`](https://docs.particle.io/reference/firmware/#tcpclient) class make it easy to make network requests from your embedded apps, but in [POSIX](https://en.wikipedia.org/wiki/POSIX) environments (Linux, BSD, Mac) networking can be a little more complicated.\n\nThis library provides a `TCPClient` class, which allows you to make TCP requests in a super simple way.\n\nWorks great when porting apps or libraries from Arduino or Particle projects to Linux or WiringPi.\n\n## Usage\n\n```c++\n// Create a TCP client\nTCPClient client;\n\n// Connect to the following address and port\nclient.connect(\"httpbin.org\", 80);\n\n// Make sure we're connected\nif(client.connected()) {\n    // Make a HTTP GET request\n    client.println(\"GET /get HTTP/1.0\");\n    client.println();\n\n    // Read the response and print it\n    while(client.available()) {\n        printf(\"%c\", client.read());\n    }\n}\n\n// Close the connection\nclient.stop();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopj%2Ftcpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopj%2Ftcpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopj%2Ftcpclient/lists"}