{"id":21091202,"url":"https://github.com/jadedctrl/facilservil","last_synced_at":"2026-01-02T07:10:59.320Z","repository":{"id":122977688,"uuid":"164027211","full_name":"JadedCtrl/facilservil","owner":"JadedCtrl","description":"Easily make TCP servers in Common Lisp. (🪞 Mirror)","archived":false,"fork":false,"pushed_at":"2024-01-29T06:31:26.000Z","size":31,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T01:13:31.174Z","etag":null,"topics":["server-framework","tcp","tcp-server"],"latest_commit_sha":null,"homepage":"https://hak.xwx.moe/jadedctrl/facilservil","language":"Common Lisp","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/JadedCtrl.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"COPYING.txt","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":"2019-01-03T21:59:15.000Z","updated_at":"2024-01-30T00:20:17.000Z","dependencies_parsed_at":"2024-01-29T08:01:15.967Z","dependency_job_id":null,"html_url":"https://github.com/JadedCtrl/facilservil","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/JadedCtrl%2Ffacilservil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Ffacilservil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Ffacilservil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadedCtrl%2Ffacilservil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JadedCtrl","download_url":"https://codeload.github.com/JadedCtrl/facilservil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532849,"owners_count":20306217,"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":["server-framework","tcp","tcp-server"],"created_at":"2024-11-19T21:44:22.002Z","updated_at":"2026-01-02T07:10:59.261Z","avatar_url":"https://github.com/JadedCtrl.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============================================================================\nFACILSERVIL : `Easy Server`\n===============================================================================\n\nSometimes, it's just annoying and time-draining to deal with all of the\nintricacies of :usockets— facilservil abstracts away all of those bits.\n\n\n————————————————————————————————————————\nFEATURES\n————————————————————————————————————————\n * Multi-threaded\n * Input-handling\n * Logging system\n * UTF-8\n\n\n————————————————————————————————————————\nDEMONSTRATION\n————————————————————————————————————————\nLoad up Facilservil, then run this in your repl:\n    \n       (facilservil:ex-server \"localhost\" 8888)\n\nNow, connect your computer on port 8888.\nThis example server is a chat server, so it might be useful to connect a couple\nof times, for demonstration's sake.\n\nIf you're on LiGNUx or BSD, you can use \"telnet localhost 8888\"\n\n\nIn reality, 'ex-server is just a small function for demonstration-- the\nexample server really looks like this:\n\n\t(facilservil:server host port\n\t                    #'ex-connect #'ex-disconnect #'ex-input #'ex-loop)\n\nIt runs #'ex-connect when you connect, #'ex-disconnect when you disconnect,\nand #'ex-input-ex after you finish a command, and #'ex-loop after handling\neveryone's input (or after timeout of waiting for input).\n\n\nFor a different kind of example (less interesting, since it takes no user\ninput), look at QOTDD (https://hak.xwx.moe/jadedctrl/qotdd).\n\nFor a more comprehensive guide to Facilservil, look to USAGE, coming right up.\n\n\n————————————————————————————————————————\nUSAGE\n————————————————————————————————————————\nTo use Facilservil, just use the `facilservil:server` function somewhere.\n\n\"host\" and \"port\" are, obviously, the host-IP and port, respectively.\n\"on-connect\"\tis the function that will be executed when a user connects.\n\"on-disconnect\"\tis the function that will run when someone disconnects.\n\"on-input\"\tis the function that will run when someone sends a command\n\"on-loop\"\tis the function running when all input is complete/timeouts\n\n\nBasically, you write the \"connecting\", \"disconnecting\", and \"input-handler\"\nfunctions (maybe \"halting\"), and you've got a handy-dandy server.\n\nThese functions you write must accept the following arguments:\n        on-connect\t(connection connection-list)\n        on-disconnect\t(connection connection-list)\n        on-input\t(connection input-string connection-list)\n\ton-loop    \t(connection-list)\n\n\nYou can use #'send to send strings to a given connection.\n\nEach connection has a built-in hashtable (for storing user-IDs, usernames,\nwhatever you need). You can store/set a variable with #'bury, and retrieve with\n#'dig.\n\n\n————————————————————————————————————————\nBORING STUFF\n————————————————————————————————————————\nBased on Sergey's gist \u003csergey@polzunov.com\u003e\nAuthor is Jaidyn Ann \u003cjadedctrl@posteo.at\u003e\nLicense is BSD 3-Clause “New”, see COPYING.txt\nSauce is at https://hak.xwx.moe/jadedctrl/facilservil\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadedctrl%2Ffacilservil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadedctrl%2Ffacilservil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadedctrl%2Ffacilservil/lists"}