{"id":19535698,"url":"https://github.com/miyako/4d-plugin-ix-websocket-v2","last_synced_at":"2025-10-26T07:38:47.170Z","repository":{"id":41387126,"uuid":"462990431","full_name":"miyako/4d-plugin-ix-websocket-v2","owner":"miyako","description":"Simple websocket based on IXWebSocket-11.0.8","archived":false,"fork":false,"pushed_at":"2023-10-18T08:05:09.000Z","size":43874,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-26T04:16:52.102Z","etag":null,"topics":["4d-plugin","websocket"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miyako.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-02-24T03:09:02.000Z","updated_at":"2024-08-27T05:03:32.000Z","dependencies_parsed_at":"2025-01-08T18:03:20.156Z","dependency_job_id":null,"html_url":"https://github.com/miyako/4d-plugin-ix-websocket-v2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/miyako/4d-plugin-ix-websocket-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-ix-websocket-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-ix-websocket-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-ix-websocket-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-ix-websocket-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/4d-plugin-ix-websocket-v2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2F4d-plugin-ix-websocket-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281074242,"owners_count":26439421,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["4d-plugin","websocket"],"created_at":"2024-11-11T02:19:38.833Z","updated_at":"2025-10-26T07:38:47.113Z","avatar_url":"https://github.com/miyako.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-18%2B-EB8E5F)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm%20|%20win-64\u0026color=blue)\n\n# 4d-plugin-ix-websocket-v2\nSimple websocket based on [IXWebSocket-11.0.8](https://github.com/machinezone/IXWebSocket/releases/tag/v11.0.8)\n\n### build notes\n\non Mac, add `USE_OPEN_SSL`. TLS is not supported with [AppleSSL backend](https://machinezone.github.io/IXWebSocket/design/).   \n\n## Websocket SET METHOD\n\ncallback is invoked for the following events:\n\n* Message(0)\n* Open(1)\n* Close(2)\n* Error(3)\n\nfor simplicity, it is **not** called for the following events:\n\n* Ping(4)\n* Pong(5)\n* Fragment(6)\n\n```4d\nWebsocket SET METHOD(method)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|method|Text|callback project method name|\n\n## Websocket Get method\n\n```4d\nmethod:=Websocket Get method\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|method|Text|callback project method name|\n\n## Websocket client\n\ncreate client object\n\n```4d\nsocket:=Websocket client(options)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|options|Object||\n|options.URL|Text||\n|options.headers|Object|optional, KVP|\n|options.pingInterval|Number|optional, seconds|\n|options.enableAutomaticReconnection|Boolean|optional, true by default|\n|options.enablePong|Boolean|optional|\n|options.enablePerMessageDeflate|Boolean|optional|\n|options.maxWaitBetweenReconnectionRetries|Number|optional, milliseconds|\n|options.certFile|Text|optional, PEM|\n|options.keyFile|Text|optional, PEM|\n|options.caFile|Text|optional, PEM|\n|options.ciphers|Text|optional|\n|options.tls|Boolean|optional|\n|socket|Object||\n|socket.id|Number|unique identifier (positive)|\n\nif `id` is passed in `options`, information is returned instead of creating a new client object.\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.readyState|Text||\n|socket.URL|Text||\n|socket.perMessageDeflateOptionsEnabled|Boolean||\n|socket.automaticReconnectionEnabled|Boolean||\n|socket.maxWaitBetweenReconnectionRetries|Number||\n|socket.pingInterval|Number||\n|socket.bufferedAmount|Number||\n\n## Websocket client start\n\nconnect and run client object\n\n```4d\nstatus:=Websocket client start(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|socket.timeout|Number|optional, `30` seconds by default|\n|status|Object||\n|status.headers|Object||\n|status.http_status|Number||\n|status.success|Boolean||\n|status.uri|Text||\n|status.errorStr|Text|on failure|\n\n`Websocket client` property can be modified while the client is stopped\n\n## Websocket client stop\n\nstop client object\n\n```4d\nstatus:=Websocket client stop(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|socket.code|Number|optional|\n|socket.reason|Text|optional|\n|status|Object|information (same as `Websocket client`)|\n\n## Websocket client send\n\nsend message\n\n```4d\nstatus:=Websocket client send(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|socket.message|Text|optional|\n|status|Object||\n|status.success|Boolean||\n|status.compressionError|Boolean||\n|status.payloadSize|Number||\n|status.wireSize|Number||\n\n## Websocket client clear\n\nstop and destroy client object\n\n```4d\nstatus:=Websocket client clear(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|status|Object||\n|status.success|Boolean||\n\n## Websocket server\n\ncreate server object\n\n```4d\nsocket:=Websocket server(options)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|options|Object||\n|options.port|Number|optional|\n|options.backlog|Number|optional|\n|options.handshakeTimeoutSecs|Number|optional|\n|options.addressFamily|Number|optional|\n|options.maxConnections|Number|optional|\n|options.host|Text|optional|\n|options.enablePong|Boolean|optional|\n|options.enablePerMessageDeflate|Boolean|optional|\n|options.certFile|Text|optional, PEM|\n|options.keyFile|Text|optional, PEM|\n|options.caFile|Text|optional, PEM|\n|options.ciphers|Text|optional|\n|options.tls|Boolean|optional|\n|socket|Object||\n|socket.id|Number|unique identifier (negative)|\n\nif `id` is passed in `options`, information is returned instead of creating a new server object.\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.clients|Collection of Text|URLs|\n            \n## Websocket server start\n\nlisten and start server object\n\n```4d\nstatus:=Websocket client start(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|status|Object||\n|status.headers|Object||\n|status.http_status|Number||\n|status.success|Boolean||\n|status.uri|Text||\n|status.errorStr|Text|on failure|\n\n`Websocket server` property other than `port` `host` `backlog` `maxConnections` `handshakeTimeoutSecs` `addressFamily` can be modified while the server is stopped\n\n## Websocket server stop\n\nstop server object\n\n```4d\nstatus:=Websocket server stop(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|status|Object|information (same as `Websocket server`)|\n\n## Websocket server send\n\nsend message\n\n```4d\nstatus:=Websocket server send(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|socket.message|Text|optional|\n|socket.uri|Text or Collection of Text|optional|\n|status|Object||\n|status.statuses[]|Collection of Objects||\n|status.statuses[].success|Boolean||\n|status.statuses[].compressionError|Boolean||\n|status.statuses[].payloadSize|Number||\n|status.statuses[].wireSize|Number||\n|status.statuses[].uri|Text||\n\nby default, message is sent to all connected clients. to target a specific client, pass `uri`\n\n## Websocket server clear\n\nstop and destroy server object\n\n```4d\nstatus:=Websocket server clear(socket)\n```\n\n|Parameter|Type|Description|\n|-|-|-|\n|socket|Object||\n|socket.id|Number|socket unique identifier|\n|status|Object||\n|status.success|Boolean||\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-ix-websocket-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2F4d-plugin-ix-websocket-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2F4d-plugin-ix-websocket-v2/lists"}