{"id":13439463,"url":"https://github.com/usocket/usocket","last_synced_at":"2026-01-10T06:42:52.262Z","repository":{"id":21028033,"uuid":"24323422","full_name":"usocket/usocket","owner":"usocket","description":"Universal socket library for Common Lisp","archived":false,"fork":false,"pushed_at":"2025-02-07T00:27:41.000Z","size":2099,"stargazers_count":228,"open_issues_count":27,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-02-07T01:25:34.389Z","etag":null,"topics":["common-lisp","networking","socket"],"latest_commit_sha":null,"homepage":"https://common-lisp.net/project/usocket/","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usocket.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","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":"2014-09-22T09:57:46.000Z","updated_at":"2025-02-07T00:27:44.000Z","dependencies_parsed_at":"2023-01-13T21:16:20.092Z","dependency_job_id":"24835688-ffbd-46d8-bca3-36174522638a","html_url":"https://github.com/usocket/usocket","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usocket%2Fusocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usocket%2Fusocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usocket%2Fusocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usocket%2Fusocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usocket","download_url":"https://codeload.github.com/usocket/usocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244577684,"owners_count":20475347,"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":["common-lisp","networking","socket"],"created_at":"2024-07-31T03:01:14.116Z","updated_at":"2026-01-10T06:42:52.191Z","avatar_url":"https://github.com/usocket.png","language":"Common Lisp","readme":"## USOCKET - Universal socket library for Common Lisp\n\nhttps://usocket.common-lisp.dev\n\nThis is the `usocket` Common Lisp sockets library - a library to bring\nsockets access to the broadest of Common Lisp implementations as possible.\n\n## The library currently supports:\n\n1. Allegro CL\n2. ABCL (ArmedBear)\n3. Clasp\n4. Clozure CL\n5. Corman Lisp\n6. GNU CLISP\n7. CMUCL\n8. ECL\n9. LispWorks (4.3 and up)\n10. Digitool MCL and RMCL (5.0 and up)\n11. Mezzano\n12. MOCL\n13. SBCL\n14. Scieneer CL\n15. Symbolics Lisp Machine (Genera)\n\nIf your favorite Common Lisp is missing from the above list, please contact\nusocket-devel@common-lisp.net and submit a request.  Please include\nreferences to available sockets functions in your Lisp implementation.\n\nThe library is [ASDF](http://cliki.net/ASDF)-enabled, meaning\nthat you can tar up a checkout and use that to `asdf-install:install`\nthe package in your system package site.  (Or use your usual ASDF\ntricks to use the checkout directly.)\n\n## Remarks on licensing\n\nEven though the source code has an MIT-style license attached to it,\nwhen compiling this code with some of the supported Lisp implementations\nyou may not end up with an MIT-style binary version due to the licensing\nof the implementations themselves.  ECL is such an example and - when\nit comes to be supported - so is GCL.\n\n## Non-support of :external-format\n\nBecause of its definition in the Hyperspec, there's no common\nexternal-format between Lisp implementations: every vendor has chosen\na different way to solve the problem of newline translation or\ncharacter set recoding.\n\nBecause there's no way to avoid platform-specific code in the application\nwhen using external-format, the purpose of a portability layer gets\ndefeated.  So, for now, `usocket` doesn't support external-format.\n\nThe workaround to get reasonably portable external-format support is to\nlayer a `flexi-stream` (from `flexi-streams`) on top of a `usocket` stream.\n\n## API definition\n\n - `usocket` (class)\n - `stream-usocket` (class; usocket derivative)\n - `stream-server-usocket` (class; usocket derivative)\n - `socket-connect (host port \u0026key element-type)` (function) \n \n   Create an active/connected socket. `host` can be a vectorized IP, or a string representation of a dotted IP address, or a hostname for lookup in the DNS system.\n   \n - `socket-listen (host port \u0026key reuseaddress backlog element-type)` (function) \n \n   Create a passive/listening socket. For possible values of `host`, see `socket-connect`.\n   \n - `socket-accept (socket \u0026key element-type)` (method)\n\n   Create an active/connected socket. Returns (server side) a connected socket derived from a listening/passive socket.\n   \n - `socket-close (socket)` (method)\n \n   Where `socket` is a previously-returned socket.\n   \n - `socket` (usocket slot accessor),\n \n   Returns the internal/implementation-defined socket representation.\n   \n - `socket-stream (socket)` (usocket slot accessor),\n    \n   Returns a value which satisfies the normal stream interface.\n   \n - `socket-shutdown`\n\n### Errors:\n - `address-in-use-error`\n - `address-not-available-error`\n - `bad-file-descriptor-error`\n - `connection-refused-error`\n - `connection-aborted-error`\n - `connection-reset-error`\n - `invalid-argument-error`\n - `no-buffers-error`\n - `operation-not-supported-error`\n - `operation-not-permitted-error`\n - `protocol-not-supported-error`\n - `socket-type-not-supported-error`\n - `network-unreachable-error`\n - `network-down-error`\n - `network-reset-error`\n - `host-down-error`\n - `host-unreachable-error`\n - `shutdown-error`\n - `timeout-error`\n - `unknown-error`\n\n### Non-fatal conditions:\n - `interrupted-condition`\n - `unknown-condition`\n\n(for a description of the API methods and functions see\n  https://usocket.common-lisp.dev/api-docs.shtml)\n\n## Test suite\n\nThe test suite unfortunately isn't mature enough yet to run without\nsome manual configuration.  Several elements are required which are\nhard to programatically detect.  Please adjust the test file before\nrunning the tests, for these variables:\n\n- `+non-existing-host+`: The stringified IP address of a host on the\n     same subnet.  No physical host may be present.\n- `+unused-local-port+`: A port number of a port not in use on the\n     machine the tests run on.\n- `+common-lisp-net+`: A vector with 4 integer elements which make up\n     an IP address. This must be the IP \"common-lisp.net\" resolves to.\n\n## Known problems\n\n- CMUCL error reporting wrt sockets raises only simple-errors\n  meaning there's no way to tell different error conditions apart.\n  All errors are mapped to unknown-error on CMUCL.\n\n- The ArmedBear backend doesn't do any error mapping (yet). Java\n  defines exceptions at the wrong level (IMO), since the exception\n  reported bears a relation to the function failing, not the actual\n  error that occurred: for example 'Address already in use' (when\n  creating a passive socket) is reported as a `BindException` with\n  an error text of 'Address already in use'. There's no way to sanely\n  map `BindException` to a meaningfull error in usocket. [This does not\n  mean the backend should not at least map to `unknown-error`!]\n\n- When using the library with ECL, you need the C compiler installed\n  to be able to compile and load the Foreign Function Interface.\n  Not all ECL targets support DFFI yet, so on some targets this would\n  be the case anyway.  By depending on this technique, usocket can\n  reuse the FFI code on all platforms (including Windows).  This benefit\n  currently outweighs the additional requirement. (hey, it's *Embeddable*\n  Common Lisp, so, you probably wanted to embed it all along, right?)\n","funding_links":[],"categories":["Common Lisp","Interfaces to other package managers"],"sub_categories":["Hosting platforms"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusocket%2Fusocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusocket%2Fusocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusocket%2Fusocket/lists"}