{"id":20511038,"url":"https://github.com/sean-codes/cs-sockets","last_synced_at":"2025-04-13T22:41:31.221Z","repository":{"id":91334724,"uuid":"76552631","full_name":"sean-codes/cs-sockets","owner":"sean-codes","description":"NodeJS server for CS Engine","archived":false,"fork":false,"pushed_at":"2017-07-27T19:32:43.000Z","size":89,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T13:01:44.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/sean-codes.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-15T11:08:03.000Z","updated_at":"2022-11-29T19:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1f24c6a-bd9d-4d36-bed3-5a0635615a9d","html_url":"https://github.com/sean-codes/cs-sockets","commit_stats":{"total_commits":111,"total_committers":1,"mean_commits":111.0,"dds":0.0,"last_synced_commit":"8db70d9e7684c5c46b50bd8a3f3565a68d949958"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-sockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-sockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-sockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-sockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean-codes","download_url":"https://codeload.github.com/sean-codes/cs-sockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794424,"owners_count":21162613,"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-15T20:34:17.643Z","updated_at":"2025-04-13T22:41:31.201Z","avatar_url":"https://github.com/sean-codes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CS-Sockets\nPure NodeJS server for snappy string networking\n\n\u003enpm install cs-sockets\n\n# Purpose \nText only based networking for simple JSON networking\n\n# Performance\nLocal Machine ~3,000 per second 256 byte string Up/Down\n\n100k 127byte strings Up/Down in 1 minute.\n\nRemote ~500+ 256 byte string Up/Down (Coffee Shop Wireless Connection)\n\n\n# Usage\n### An echo server:\n\n    const csServer = require('csServer');\n    const server = new csServer({ port: '9999' });\n\n    server.on('connect', function(socket){\n        \n    server.on('message', function(socket, message){\n            this.send(socket, message);\n        });\n    });\n\n### Starting CS-Sockets:\n\n    const csServer = require('csServer');\n    const server = new csServer({[options]})\n\n\n### Socket Opens Connection:\n\n    csServer.on('connect', [function(socket)]);\n\n### Socket Sends Data:\n\n    csServer.on('message', [function(message)]);\n\n### Sending Data to a socket:\n\n    csServer.send([socket to receive], message);\n\n### Socket Disconnecting\n\n    csServer.on('disconnect', [function(socket)])\n\n### SSL Connections\nTo use your SSL and Key add a ssl field to your csServer options\n\u003eWhen the server starts you should see the message Starting Server (SSL)\n\n    const server = new csServer({\n        port: 9999,\n        ssl: {\n            key: '/etc/letsencrypt/archive/cube-script.net/privkey1.pem',//Your key path\n            cert: '/etc/letsencrypt/archive/cube-script.net/fullchain1.pem'//Your Cert Path\n        }\n    });\n    \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fcs-sockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean-codes%2Fcs-sockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fcs-sockets/lists"}