@simplysm/service-common 13.0.12 → 13.0.13

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 (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -36,7 +36,7 @@ pnpm add @simplysm/service-common
36
36
 
37
37
  ## ServiceProtocol
38
38
 
39
- The core class for encoding/decoding messages into binary format. Messages exceeding 3MB are automatically split into 300KB chunks, and the receiving side automatically assembles the chunks to restore the original message.
39
+ The core interface for encoding/decoding messages into binary format. Created via the `createServiceProtocol()` factory function. Messages exceeding 3MB are automatically split into 300KB chunks, and the receiving side automatically assembles the chunks to restore the original message.
40
40
 
41
41
  ### Binary Header Structure
42
42
 
@@ -68,10 +68,10 @@ Each chunk consists of a 28-byte header and body (Big Endian).
68
68
  ### Usage Example
69
69
 
70
70
  ```typescript
71
- import { ServiceProtocol } from "@simplysm/service-common";
71
+ import { createServiceProtocol } from "@simplysm/service-common";
72
72
  import { Uuid } from "@simplysm/core-common";
73
73
 
74
- const protocol = new ServiceProtocol();
74
+ const protocol = createServiceProtocol();
75
75
 
76
76
  // Encoding: Convert message to binary chunks
77
77
  const uuid = Uuid.new().toString();
@@ -334,7 +334,7 @@ Pass values like `"win32"`, `"darwin"`, `"linux"` to `platform`.
334
334
 
335
335
  ## Caveats
336
336
 
337
- - `ServiceProtocol` instances internally use `LazyGcMap` to manage incomplete split messages. After use, you must call `dispose()` to release the GC timer.
337
+ - `ServiceProtocol` instances are created via `createServiceProtocol()` factory function and internally use `LazyGcMap` to manage incomplete split messages. After use, you must call `dispose()` to release the GC timer.
338
338
  - Encoding or decoding messages exceeding `PROTOCOL_CONFIG.MAX_TOTAL_SIZE` (100MB) will throw an `ArgumentError`.
339
339
  - Passing binary data less than 28 bytes during decoding will throw an `ArgumentError`.
340
340
  - Service interfaces (`OrmService`, `CryptoService`, etc.) only provide type definitions. Actual implementations are handled by the `@simplysm/service-server` package.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplysm/service-common",
3
3
  "sideEffects": false,
4
- "version": "13.0.12",
4
+ "version": "13.0.13",
5
5
  "description": "심플리즘 패키지 - 서비스 모듈 (common)",
6
6
  "author": "김석래",
7
7
  "repository": {
@@ -18,7 +18,7 @@
18
18
  "src"
19
19
  ],
20
20
  "dependencies": {
21
- "@simplysm/core-common": "13.0.12",
22
- "@simplysm/orm-common": "13.0.12"
21
+ "@simplysm/core-common": "13.0.13",
22
+ "@simplysm/orm-common": "13.0.13"
23
23
  }
24
24
  }