{"id":24607504,"url":"https://github.com/bugszhou/mini-websocket","last_synced_at":"2025-10-19T19:20:15.043Z","repository":{"id":51983219,"uuid":"180555446","full_name":"bugszhou/mini-websocket","owner":"bugszhou","description":"小程序websocket","archived":false,"fork":false,"pushed_at":"2021-05-08T14:10:51.000Z","size":497,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T13:08:42.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bugszhou.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":"2019-04-10T10:09:18.000Z","updated_at":"2021-01-25T17:58:15.000Z","dependencies_parsed_at":"2022-08-26T00:20:14.391Z","dependency_job_id":null,"html_url":"https://github.com/bugszhou/mini-websocket","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/bugszhou%2Fmini-websocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugszhou%2Fmini-websocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugszhou%2Fmini-websocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugszhou%2Fmini-websocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugszhou","download_url":"https://codeload.github.com/bugszhou/mini-websocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181397,"owners_count":20411605,"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":"2025-01-24T17:38:19.398Z","updated_at":"2025-10-19T19:20:14.974Z","avatar_url":"https://github.com/bugszhou.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-websocket\n小程序websocket\n\n### Usage\n\n```\nconst socket = new MiniSocket('ws://localhost:7070/yt22u');\nsocket\n      .on('message', (err, msg) =\u003e {\n        console.log(msg);\n      })\n      .on('close', (err, { type }) =\u003e {\n        if (type === 'SERVER_CLOSE') {\n          console.log(''服务器已关闭'');\n        }\n        console.log('close ===\u003e ', type);\n      })\n      .on('notopen', (err, data) =\u003e {\n        socket.reConnect({ data });\n      })\n      .on('reconnect', (err, { data }) =\u003e {\n        this.send(data);\n        console.log('reconnect ====\u003e ', data);\n      })\n      .on('retryTimeout', () =\u003e {\n        console.log('retryTimeout');\n      })\n      .on('catch', () =\u003e {\n        console.log('catch');\n      });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugszhou%2Fmini-websocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugszhou%2Fmini-websocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugszhou%2Fmini-websocket/lists"}