iosignal 2.0.0 → 2.2.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.
package/README.md CHANGED
@@ -6,13 +6,6 @@ The signaling protocol is built-in, so the server can be used without programmin
6
6
  [Kr] iosignal 은 웹브라우저, node.js , arduino 간의 실시간 통신을 지원합니다. 또한 보안 인증과 암호통신 기능도 제공됩니다.
7
7
  시그널링 프로토콜이 내장되어 있어서 서버는 프로그래밍 없이 사용 가능합니다.
8
8
 
9
- ## online demo
10
-
11
- ### StackBlitz Webcontainer demo
12
-
13
- [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/remocons/iosignal-example)
14
-
15
-
16
9
  ## Install
17
10
 
18
11
  ```shell
@@ -44,7 +37,7 @@ const server = new Server(
44
37
  port: 7777,
45
38
  congPort: 8888,
46
39
  showMetric: 2,
47
- showMessage: 'message' // show raw signal buffer
40
+ showMessage: 'message' // show signal message
48
41
  })
49
42
 
50
43
  ```
@@ -77,8 +70,8 @@ server.api('reply', api_reply) // attach api module
77
70
  Example of a client calling the reply API
78
71
 
79
72
  ```js
80
- // web browser example
81
- <script src="../dist/iosignal.iife.js"></script>
73
+ // web browser api client example
74
+ <script src="../dist/io.min.js"></script>
82
75
  <script>
83
76
  const io = new IO('ws://localhost:7777')
84
77
 
@@ -106,12 +99,12 @@ Fri, 09 Feb 2024 14:24:37 GMT
106
99
  ### NodeJS Client
107
100
  ```js
108
101
  // ESM
109
- import { IOWS } from "iosignal"
102
+ import { IO } from "iosignal"
110
103
 
111
104
  // CJS
112
- // const { IOWS } = require('iosignal')
105
+ // const { IO } = require('iosignal')
113
106
 
114
- const io = new IOWS('wss://io.iosignal.net/ws')
107
+ const io = new IO('wss://io.iosignal.net/ws')
115
108
 
116
109
  io.on('ready', ()=>{
117
110
  console.log('ready cid:', io.cid)
@@ -128,13 +121,12 @@ Fri, 09 Feb 2024 14:24:37 GMT
128
121
 
129
122
  ```
130
123
 
131
- ### Browser Client : IIFE
132
-
124
+ ### Browser Client : UMD(IIFE)
125
+ - local file: "./dist/io.min.js"
126
+ - CDN: https://cdn.jsdelivr.net/npm/iosignal@2.2.0/dist/io.min.js
133
127
  ```html
134
128
  <html>
135
-
136
- <script src="../dist/iosignal.iife.js"></script>
137
-
129
+ <script src="../dist/io.min.js"></script>
138
130
  <script>
139
131
  console.log('IO', IO) // default global variable name is IO
140
132
 
@@ -184,11 +176,15 @@ Fri, 09 Feb 2024 14:24:37 GMT
184
176
  ```
185
177
 
186
178
  ### Browser client : ESM
179
+
180
+ - local file: "./dist/io.js"
181
+ - CDN: https://cdn.jsdelivr.net/npm/iosignal@2.2.0/dist/io.js
182
+
187
183
  ```html
188
184
  <html>
189
185
 
190
186
  <script type="module">
191
- import IO from "../dist/iosignal.js"
187
+ import IO from "../dist/io.js"
192
188
 
193
189
  const io = new IO('wss://io.iosignal.net/ws')
194
190
  io.listen('channel#topic', (...args)={