{"id":17482843,"url":"https://github.com/creationix/websocket","last_synced_at":"2025-04-10T02:44:09.857Z","repository":{"id":769851,"uuid":"454513","full_name":"creationix/websocket","owner":"creationix","description":"A simple drop-in replacement for node's TCP server that supports the WebSocket protocol.","archived":false,"fork":false,"pushed_at":"2010-04-24T04:31:37.000Z","size":100,"stargazers_count":26,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T04:14:38.352Z","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/creationix.png","metadata":{"files":{"readme":"README.markdown","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":"2009-12-31T16:32:35.000Z","updated_at":"2023-09-08T16:26:09.000Z","dependencies_parsed_at":"2022-08-16T10:50:24.193Z","dependency_job_id":null,"html_url":"https://github.com/creationix/websocket","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fwebsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fwebsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fwebsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creationix%2Fwebsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creationix","download_url":"https://codeload.github.com/creationix/websocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248145635,"owners_count":21055174,"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-10-18T23:46:03.459Z","updated_at":"2025-04-10T02:44:09.838Z","avatar_url":"https://github.com/creationix.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebSocket Server\n\n`websocket` is a simple wrapper around tcp.createServer that abstracts away the details of a browser WebSocket.  It's designed to be a drop in replacement for a regular TCP server, but be accessible from a browser that supports WebSocket.\n\n    var websocket = require(\"websocket\");\n    var server = websocket.createServer(function (socket) {\n\n      socket.write(\"hello\\r\\n\");\n\n      socket.addListener(\"data\", function (data) {\n        socket.write(data);\n      });\n      socket.addListener(\"end\", function () {\n        socket.write(\"goodbye\\r\\n\");\n        socket.end();\n      });\n    });\n    server.listen(7000, \"localhost\");\n  \nThis implementation is quick and dirty and skips over a lot of details.  For example it doesn't validate any of the same origin stuff.\n\nFor a more fleshed out implementation, but with a larger api, please see \u003chttp://github.com/guille/node.websocket.js/\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreationix%2Fwebsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreationix%2Fwebsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreationix%2Fwebsocket/lists"}