iosignal 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.vscode/settings.json +3 -0
  2. package/README.en.md +56 -0
  3. package/README.md +39 -782
  4. package/dist/io.d.ts +10 -3
  5. package/dist/io.js +4 -4
  6. package/dist/io.js.map +1 -1
  7. package/dist/io.min.js +4 -4
  8. package/dist/io.min.js.map +1 -1
  9. package/dist/iosignal.js +266 -217
  10. package/dist/types/client/IOCore.d.ts +10 -3
  11. package/package.json +3 -4
  12. package/src/api/RedisAPI.js +19 -31
  13. package/src/api/api_reply.js +14 -6
  14. package/src/api/api_sudo.js +2 -8
  15. package/src/auth/Auth_Redis.js +8 -3
  16. package/src/auth/BohoAuth.js +12 -12
  17. package/src/client/CongPacket.js +2 -0
  18. package/src/client/IOCore.js +98 -52
  19. package/src/server/Manager.js +12 -12
  20. package/src/server/Metric.js +1 -2
  21. package/src/server/RemoteCore.js +27 -34
  22. package/src/server/Server.js +69 -60
  23. package/src/server/serverOption.js +3 -2
  24. package/README.ko.md +0 -566
  25. package/docs/iosignal_architecture.png +0 -0
  26. package/examples/react-chat-js/dist/assets/index-Cy4qaVcJ.js +0 -56
  27. package/examples/react-chat-js/dist/assets/index-NETrjYhz.css +0 -1
  28. package/examples/react-chat-js/dist/index.html +0 -14
  29. package/examples/react-chat-js/index.html +0 -13
  30. package/examples/react-chat-js/package-lock.json +0 -1723
  31. package/examples/react-chat-js/package.json +0 -20
  32. package/examples/react-chat-js/src/App.css +0 -61
  33. package/examples/react-chat-js/src/App.jsx +0 -125
  34. package/examples/react-chat-js/src/index.css +0 -13
  35. package/examples/react-chat-js/src/main.jsx +0 -13
  36. package/examples/react-chat-js/src/shared_io.js +0 -12
  37. package/examples/react-chat-js/vite.config.js +0 -7
  38. package/examples/server/index.js +0 -12
  39. package/examples/server/package-lock.json +0 -47
  40. package/examples/server/package.json +0 -12
  41. package/examples/svelte-chat-js/.devtools +0 -3
  42. package/examples/svelte-chat-js/README.md +0 -38
  43. package/examples/svelte-chat-js/package-lock.json +0 -1505
  44. package/examples/svelte-chat-js/package.json +0 -22
  45. package/examples/svelte-chat-js/src/app.css +0 -105
  46. package/examples/svelte-chat-js/src/app.d.ts +0 -13
  47. package/examples/svelte-chat-js/src/app.html +0 -12
  48. package/examples/svelte-chat-js/src/lib/images/github.svg +0 -1
  49. package/examples/svelte-chat-js/src/lib/images/svelte-logo.svg +0 -1
  50. package/examples/svelte-chat-js/src/lib/images/svelte-welcome.png +0 -0
  51. package/examples/svelte-chat-js/src/lib/images/svelte-welcome.webp +0 -0
  52. package/examples/svelte-chat-js/src/lib/shared_io.js +0 -12
  53. package/examples/svelte-chat-js/src/routes/+layout.svelte +0 -9
  54. package/examples/svelte-chat-js/src/routes/+page.js +0 -3
  55. package/examples/svelte-chat-js/src/routes/+page.svelte +0 -162
  56. package/examples/svelte-chat-js/static/favicon.svg +0 -1
  57. package/examples/svelte-chat-js/static/global.css +0 -19
  58. package/examples/svelte-chat-js/static/robots.txt +0 -3
  59. package/examples/svelte-chat-js/svelte.config.js +0 -15
  60. package/examples/svelte-chat-js/vite.config.js +0 -6
  61. package/test-browser/favicon.ico +0 -0
  62. package/test-browser/index.html +0 -95
  63. package/test-browser/server.js +0 -12
  64. package/test-nodejs/client-playToggle.js +0 -19
  65. package/test-nodejs/client.js +0 -17
  66. package/test-nodejs/client_api_reply.js +0 -15
  67. package/test-nodejs/server-Auth_Env.js +0 -19
  68. package/test-nodejs/server-Auth_File.js +0 -12
  69. package/test-nodejs/server-api_reply.js +0 -6
  70. package/test-nodejs/server-api_sudo.js +0 -7
  71. package/test-nodejs/server.js +0 -20
  72. package/test-nodejs/signalPack.js +0 -34
  73. package/test-nodejs/signaling.js +0 -61
  74. package/test-nodejs/simple-server.js +0 -13
  75. /package/{auth_file.js → auth_file_sample.js} +0 -0
  76. /package/{auth_file.json → auth_file_sample.json} +0 -0
package/dist/io.d.ts CHANGED
@@ -211,6 +211,8 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
211
211
  * @param {Buffer} buffer - The incoming data buffer.
212
212
  */
213
213
  onData(buffer: Buffer$1): void;
214
+ did: any;
215
+ uid: any;
214
216
  /**
215
217
  * Sends an IAM (I Am) message to the server.
216
218
  * @param {string} [title] - Optional title for the IAM message.
@@ -302,9 +304,9 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
302
304
  */
303
305
  get(storeName: string): Promise<any>;
304
306
  /**
305
- * Sends a request to a target and topic.
306
- * @param {string} target - The target of the request.
307
- * @param {string} topic - The topic of the request.
307
+ * Sends a request to a target and topic.(remote api call)
308
+ * @param {string} target - The target(api name) of the request.
309
+ * @param {string} topic - The topic(api function name) of the request.
308
310
  * @param {...any} args - Optional arguments for the request.
309
311
  * @returns {Promise<any>}
310
312
  */
@@ -396,6 +398,11 @@ declare class IOCore extends EventEmitter<string | symbol, any> {
396
398
  * Changes the connection state and emits events.
397
399
  * @param {string} state - The new state name (e.g., 'ready', 'closed').
398
400
  * @param {string} [emitEventAndMessage] - Optional message to emit with the state change event.
401
+ *
402
+ * 주의.
403
+ * 1. 상태가 변경 될 때만 'change' 이벤트 호출된다.
404
+ * 2. emitEventAndMessage 옵션 값이 지정되야 해당 이벤트 이름이 호출된다.
405
+ * 보통 이벤트 이름과 동일하게 적거나 이벤트 상황 안내문을 넣는다.
399
406
  */
400
407
  stateChange(state: string, emitEventAndMessage?: string): void;
401
408
  }